Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Anna
Posts:
3
Registered:
6/20/13


'Index exceeds matrix dimensions' error.
Posted:
Jun 20, 2013 2:32 PM


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!
Thanks



