From: Steven on 14 Apr 2010 10:32 i'm having trouble with the following plot im trying to show the difference in the progression of 3 systems but when a certain point is reached it starts to run really slowly. i imagine this is because i am plotting the whole graph at each loop if it just plotted the next step and added it to the plot i think this would solve the problem but i have no idea how to do this or if it is even possible. for i=1:1000 hold on pause(0.1) plot(xb(1:i,1),xb(1:i,2),'b') plot(xc(1:i,1),xc(1:i,2),'g') plot(xd(1:i,1),xd(1:i,2),'r') title('Chua`s Double Scroll Attractor') fsize=15; xlabel('x(t)','Fontsize',fsize); ylabel('y(t)','Fontsize',fsize); hold off
From: Steven on 14 Apr 2010 11:34 fixed it after much more trial and error. hold on plot(xb(1,1),xb(1,2),'b') plot(xc(1,1),xc(1,2),'m') plot(xd(1,1),xd(1,2),'r') title('Chua`s Double Scroll Attractor') axis([-2.5 2.5 -0.5 0.5]) fsize=15; xlabel('x(t)','Fontsize',fsize); ylabel('y(t)','Fontsize',fsize); zlabel('z(t)','FontSize',fsize); pause for i=2:1000 pause(0.1) plot(xb(i-1:i,1),xb(i-1:i,2),'b') plot(xc(i-1:i,1),xc(i-1:i,2),'m') plot(xd(i-1:i,1),xd(i-1:i,2),'r') end hold off
|
Pages: 1 Prev: index out of bounds because numel(y)=2. Next: Conversion ECEF to Local ENU |