Just tried something probably more realistic for my for loop that i just figured out. Does anyone have anymore suggestions on how to make it better?
Thanks!
for k=.2:.2:2
x=[0,0+k,2*k,3*k,4*k,5*k,6*k,7*k,8*k,9*k]
y=[0,2,0,2,0,2,0,2,0,1]
hold on
axis([-2 20 -2 5])
plot(x,y,'b','linewidth',2)
pause(.2)
plot(x,y,'w','linewidth',2)
end
for k=2:-.2:.2
x=[0,0+k,2*k,3*k,4*k,5*k,6*k,7*k,8*k,9*k]
y=[0,2,0,2,0,2,0,2,0,1]
hold on
axis([-2 20 -2 5])
plot(x,y,'b','linewidth',2)
pause(.2)
plot(x,y,'w','linewidth',2)
end