I need help in plotting the data but I keep getting an error
显示 更早的评论
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 个评论
Rena Berman
2017-3-23
(Answers Dev) Restored edit
Brandon Phillips
2017-3-23
Jan
2017-3-23
@Brandon: Please don't do this. Adding new information to a question is welcome, but removing details is disliked.
Rena Berman
2017-3-27
(Answers Dev) Restored edit
采纳的回答
更多回答(1 个)
Walter Roberson
2017-3-23
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.
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!