MachinaMan
Mechanical
- Aug 30, 2003
- 70
why does this only give me one point on the graph ?
thanks
Ren
Code:
t=0;
x=0;
for t=0:0.01:1,
x=(exp(-t)).*((sin(sqrt(3)*t)+cos(sqrt(3)*t)));
t=t+0.01;
end
for t=1.01:0.01:5,
x=(exp(-t)).*((sin(sqrt(3)*t) + cos(sqrt(3)*t))) + (0.866*exp(t-1)).*(sin(sqrt(3)*t));
t=t+0.01;
end
plot(t,x)
Ren