To talk on Icrontic, just register!

It only takes 30 seconds.

Have an account? Sign in:

Forgot?
sykohawk
New to the neighborhood
sykohawk
1 Posts

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?
Kwitko
Sheriff of Dicktown
Kwitko
6,521 Posts

» Subscriber

Moved to Matlab.
__________________ "Is it not cruel to let our city die by degrees, stripped of all her proud monuments, until there will be nothing left of all her history and beauty to inspire our children?... this is the time to take a stand, to reverse the tide, so that we won't all end up in a uniform world of steel and glass boxes." - Jacqueline Kennedy Onassis


shwaip
elaborate bot
shwaip
5,729 Posts
magnitude is sqrt(x^2 + y^2)

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.
Similar Threads
Thread Thread Starter Forum Replies Last Post
Matlab help on Financial Estimation!!? deaconblues Matlab Help 2 29 Aug 2008 1:42pm
Batch-processing in MATLAB geodave Matlab Help 6 18 Jul 2008 12:58am
Writing new files from Matlab raulinhoo Matlab Help 6 5 Jun 2008 8:31pm
Closing external programs in matlab raulinhoo Matlab Help 2 4 Jun 2008 3:55pm

Go Back   Icrontic Forums > Tech: Software > General Software > Matlab Help
Jump to
This Thread Search this Thread
Search this Thread:

Advanced Search


Current time: 12:49pm (GMT)
Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Get Vanilla instead. Trust me.