MATLAB HELP!!!!!!!!
alright so im new to matlab and iim having trouble on this one problem. Heres the problem...
the position as a function of time [x(t), y(t)] of a squirrel running on a grass is given by:
x(t)=-.28t^2+6.5t+61 m and
y(t)=.18t^2-8.5t+65 m
a) plot the trajectory (position) of the squirrel for 0<= t <= 30 s
b) plot (a second plot) the length of the position vector r(t)=x(t)i+y(t)j of the squirrel for 0<= t <= 30 s
c)plt ( a third plot) the angle theta(t) of the position vector for 0<=t<=30s.
I understand how to do part a but i am completely loss after this.
i have so far....
t=0:1:30;
x=-.28*t^2+6.5*t+61;
y=.18*t^2-8.5*t+65;
plot(x,y)
and i have the graph working for part a and its correct but idk how to do the last two parts...help plz?
the position as a function of time [x(t), y(t)] of a squirrel running on a grass is given by:
x(t)=-.28t^2+6.5t+61 m and
y(t)=.18t^2-8.5t+65 m
a) plot the trajectory (position) of the squirrel for 0<= t <= 30 s
b) plot (a second plot) the length of the position vector r(t)=x(t)i+y(t)j of the squirrel for 0<= t <= 30 s
c)plt ( a third plot) the angle theta(t) of the position vector for 0<=t<=30s.
I understand how to do part a but i am completely loss after this.
i have so far....
t=0:1:30;
x=-.28*t^2+6.5*t+61;
y=.18*t^2-8.5*t+65;
plot(x,y)
and i have the graph working for part a and its correct but idk how to do the last two parts...help plz?
0
Comments
angle should be arctan(y/x).
hopefully this helps. if you need more guidance, let me know.
edit - you also might want to change the step on t from 1 to 0.1 or 0.01. it will make the path smoother.