Index exceeds Array Bounds - Help!
Show older comments
Hello everyone - I receive the error "Index exceeds array bounds" , but I can't solve the Problem.
I attache the file, and this is the Line which causes the error:
Pre_Time(idx_loopi).Durchschnittswert(counter,idx_act_Channel_Time)= mean(test(idx_loopi).Channels(idx_act_Channel_Time).Data(idxStart:i));
3 Comments
David H
on 9 Jun 2020
I think the reason you are struggling to find the cause of the error is there are so many indexes used in that one line.
Maybe split it into multiple lines just for debug, something like
v1 = Pre_Time(idx_loopi)
v2 = v1.Durchschnittswert(counter,idx_act_Channel_Time);
v3 = test(idx_loopi)
v4 = v3.Channels(idx_act_Channel_Time)
v5 = v4.Data(idxStart:i));
See which gives the error
Also the for loop over "idx_loopi" appears to be over by the time you call this line, do you mean to use this index variable?
Malte Räuchle
on 9 Jun 2020
Malte Räuchle
on 9 Jun 2020
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!