Question

Using matlab, write the code and plot the graph for the following equations. The x axis would be theta from 0 deg to 360 deg while the y axis would be angular or tangential position, velocity and acceleration.

10 100 E7360 AB- eD100mm sin 1O-Sn 2To ne cose, t Cas 2 3 4 O,= To (reano,re bease-feo, sene-Feo 6 as ) Cos O2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

x0=0;

y0=6;

v0=75;

theta=45;

theta=theta*pi/180; %to convert to radian

target_x=400;

target_y=115;

syms t

ans=solve(target_y+0.5*9.81*t.^2-v0*sin(theta)*t-y0,t);

r=double(ans);

disp(r)

T=max(r);

t=linspace(0,T,100);

x=v0*cos(theta)*t+x0;

y=-0.5*9.81*t.^2+v0*sin(theta)*t+y0;

plot(x,y)

grid on

hold on

plot(target_x,target_y,'o');

hold off

100 50 0 0 100 150 200 250 300 350 400 450 50 150

Add a comment
Know the answer?
Add Answer to:
Using matlab, write the code and plot the graph for the following equations. The x axis...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT