Question
answer with easy to follow MAtlab for beginners. thank you

4 Optional MATLAB Assignment 4 Exercise 1 Use daolve , to solve and plot the solution to the initial value problem: 8 r(0)-$
0 0
Add a comment Improve this question Transcribed image text
Answer #1

>> syms x %% this is to define the system we are working on
>> dsolve('(1/8)*D2x+16*x = 0','Dx(0) = sqrt(2)','x(0) = 0.5') %% this is the command to solve the differential equation with the initial conditions , sqrt means square-root

ans =

cos(8*2^(1/2)*t)/2 + sin(8*2^(1/2)*t)/8

>> pretty(ans) %% this is to get the function in a convenient looks
cos(8 sqrt(2) t)   sin(8 sqrt(2) t)
---------------- + ----------------
        2                  8

>> ezplot(ans) %% this is for plotting the function
>> ezplot(ans,[-2 2 -0.6 0.6]) %% here I am defining the co ordinates of the graph from where to where the function will be plotted [x1 x2 y1 y2]

cos(8 212 t/2 + sin(8 212 t)/s 0.4 0.2 -0.2 -04 -0.6 .2 1.5 0.5 0.5 1.5

NOTE :

a) If you find the solution doubtful or doesn't match with your answer provided, or you feel that I am wrong by any means feel free to mention that in comment. Otherwise your downvote will keep me in doubt. So that i can correct myself and it will also help me in future to guide others.

b) Please re-check the calculation and inform me if there is any error. Happy to help.

c) Some feedbacks or rating will help me to improve myself. Wish you all the best. Happy Learning. Thank You.

Add a comment
Know the answer?
Add Answer to:
4 Optional MATLAB Assignment 4 Exercise 1 Use daolve , to solve and plot the solution to the init...
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