MATLAB coder Error evaluating test code Caused by: Index exceeds matrix dimentions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Martin Andersson
am 22 Mai 2018
Bearbeitet: Martin Andersson
am 22 Mai 2018
I solved it, thanks
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 22 Mai 2018
Bearbeitet: Walter Roberson
am 22 Mai 2018
Xstep=1:3.5/24:24;
is not guaranteed to have exactly the same number of elements in generated code.
Why are you doing "for comp=1:s; end" without any code in there? Why are you "if dx>Xstep(NR)" after that with no code inside the "if" ?
Your code generates index out of range even in MATLAB.
Your dx is greater than any Xstep() value. It is not surprising that you go past the end of the array.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!