The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: 'Index exceeds matrix dimensions' error.
Replies: 3   Last Post: Jun 20, 2013 3:46 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 6/20/13
'Index exceeds matrix dimensions' error.
Posted: Jun 20, 2013 2:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi everyone,

I have two data sets which have different time stamps relative to each other. I am trying to 'align' the time stamps so that I can compare different variables in one datset with variables in the other dataset. The data sets are measurements with start and end times and I need the start and end times to be the same in both data sets so that I can compare them. Currently, one of the data sets has a much longer matrix than the other and preceeds and exceeds the other data sets' 'start' and 'end' times by a large margin.

The larger matrix, 'a', has a start time i.e. first data entry of 30000 (not the exact value) and an end time i.e. last data entry of 55000 (not the exact value). The second, shorter data, 'b', set has the start time 36000 and the end time 54000. So I want to use the start and end times in a that correspond with those in b. I hope that makes sense!

I have tried to use the following method but without success:
>>a = [30000:55000];
>>b = [36000:54000];
>>a_start = 36000;
>>a_end = 54000;
>>c = a(a_start:a_end)

Index exceeds matrix dimensions
I'm quite new to Matlab and I would really appreciate some advice!


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.