Cant plot the vectors of unequal lengths?
4 views (last 30 days)
Show older comments
Habib Muhammad
on 20 Oct 2016
Edited: Habib Muhammad
on 20 Oct 2016
i am doing a complex simulation but i am facing the problem of plotting vectors unequal length. I tried a lot to make them equal but insane.. how can i make them equal? Size of different matrices and vectors: time= 1x2001 din = 4x2000
Thanks in advance
plot(time+0.18,fin(1,:),time,fin(2,:),'r')
plot(time(1:1000)+0.18,din(1,:),time(1:1000),din(2,:),'r')
plot(timev100,accv100(618,:),timev100butng,accv100butng(426,:))
hold on plot(time,-vel(584,:),'r-') hold on plot(time,acc(122,:),time,acc(427,:))
plot(time(1:1150),ddd(2,:),time(1:1150),dddlisan(2,:))
plot(time,-acc(781,:)) hold on plot(time,acc(387,:),'r-')
plot(time(1:1150),vel(122,1:1150),time(1:1150),vel(427,1:1150)) hold on plot(time,-dsp1(392,:),'r-')
0 Comments
Accepted Answer
Steven Lord
on 20 Oct 2016
What exactly would you want the following plot to look like?
x = [1 2 3];
y = [1 2];
plot(x, y, 'o')
How many points would you expect to see in the axes? If your answer is 3, what is the Y coordinate of the third point? If your answer is 2, you can do this by only using the first two elements of x (or the last two, or the first and third.)
plot(x(1:length(y)), y, 'o')
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!