Question

Homework Due Nov. 19 1. Solve the ODE system (Van der Pols equation) below using the function ode45 and the initial values yMMatlab Please

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

MATLAB Script:

close all
clear
clc

tspan = [0 20];
y0 = [1 1]; % Initial conditions [y1(0) y2(0)]
[t, y] = ode45(@(t, y) odefcn(t, y), tspan, y0); % Solve the system
plot(t, y(:,1), '-', t, y(:,2), '-.')
legend('y_1(t)', 'y_2(t)', 'Location', 'northwest')
title('Solution of Vander Pol''s Equation')
xlabel('t'), ylabel('y(t)')

function dydt = odefcn(t, y)
mu = 1;
dydt = [y(2); mu*(1 - y(1)^2)*y(2) - y(1)];
end

Plot:

Solution of Vander Pols Equation 3 y, (t) --Y2(t) 1 -3 6 8 10 12 14 16 18 20 CO (1)A

Add a comment
Know the answer?
Add Answer to:
MMatlab Please Homework Due Nov. 19 1. Solve the ODE system (Van der Pol's equation) below...
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