Question

MATLAB CODE: Consider the second order system x(0)-o y (o)-o G -9.8m/s let M 5g θ 350 Vo 40m/s Plot x vs y -0.5 g/m

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

The question is a Nonlinear Differential Equation with Initial Conditions given. This can be solved using the Symbolic Toolbox of MATLAB:

1. First, the code for solving x(t) is given below. Also, we convert all the variables into S.I units.

==========================================================================================

MATLAB code for solving for the variable x(t):

==========================================================================================

M=5;
alpha=0.5;

G=-9.8;

v0=40;
theta=35;

syms x(t)

D=diff(x);
ode = (M*diff(x,t,2)+alpha*(diff(x,t))^2) == 0;
cond1 = x(0) == 0;
cond2 = D(0) == v0*cosd(theta);

cond=[cond1 cond2];

X(t) = dsolve(ode,cond);

===============================================================================================

The output comes out to be:

X=10*log((1152854012943651*t)/35184372088832 + 10) - 10*log(10)

which becomes

zit) 10 x 171 (22.371t + 1

===============================================================================================

MATLAB code for solving for the variable y(t):

===============================================================================================

M=5;
alpha=0.5;

G=-9.8;

v0=40;
theta=35;

syms y(t)

D=diff(y);
ode = (M*diff(y,t,2)+alpha*(diff(y,t))^2) == G*M;
cond1 = y(0) == 0;
cond2 = D(0) == v0*sind(theta);

cond=[cond1 cond2];

Y(t) = dsolve(ode,cond);

===============================================================================================

In the output MATLAB displays a warning that the explicit solution could not be found

Y= [emp sym]

This may be because of the wrong questionf for the case of y.

===============================================================================================

Add a comment
Know the answer?
Add Answer to:
MATLAB CODE: Consider the second order system x(0)-o y (o)-o G -9.8m/s let M 5g θ...
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