Index exceeds Array Bounds - Help!
Mostrar comentarios más antiguos
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 comentarios
David H
el 9 de Jun. de 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
el 9 de Jun. de 2020
Malte Räuchle
el 9 de Jun. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
