Recieving error Index exceeds the number of array elements (98) when attempting to useODE45?

1 Ansicht (letzte 30 Tage)
I get this error trying to run the 2 codes
1.png
And I don't know if this is written coreclty. It was taken from a 2008 Version.
3.png
I get only 98 elements in the t matrix and i have to find the 350th one.2.png
4.png

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 16 Jan. 2019
t is 93x1 double, iM is 350. You try to access t(iM) which doe not exist. In other words, the index (iM, whose value is 350) exceeds the number of array elements (which is 93).
  2 Kommentare
Nuber Claudiu
Nuber Claudiu am 17 Jan. 2019
I need the 350th element in the entire matrix so i need the 35th column on the 4th row element. That is my number. how should I write it so i wont get any errors?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB 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!

Translated by