I need help in plotting the data but I keep getting an error
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Brandon Phillips
am 23 Mär. 2017
Kommentiert: Rena Berman
am 27 Mär. 2017
I get the rolling when I run the code
Error using plot Vectors must be the same length.
Error in untitled8 (line 80) subplot(2,1,1),plot(t,position)
4 Kommentare
Jan
am 23 Mär. 2017
@Brandon: Please don't do this. Adding new information to a question is welcome, but removing details is disliked.
Akzeptierte Antwort
ES
am 23 Mär. 2017
What is the length of t and position?? Both must be of same length if you want to plot them..
0 Kommentare
Weitere Antworten (1)
Walter Roberson
am 23 Mär. 2017
In most places in your code you use position as a pre-allocated 3 x n array. But in the "for t" loop as well as doing that you also have
position = [w(1);w(2);w(3)];
which overwrites all of position with a vector of length 3.
0 Kommentare
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!