I need help doing this on matlab. a.)Plot a numerical solution of this equation
ID: 2967299 • Letter: I
Question
I need help doing this on matlab.
a.)Plot a numerical solution of this equation from t = 0 to t = 40 for each of the intial values c = 0.5, 1, 1.5, 2, 2.5. Describe how increasing the intial value of y affects the solutions, both in terms of their limiting behavior and their general appearance.
b.) Plot all five solutions on one graph.
I need help doing this on matlab. d^2y/dt^2 + 0.15dy/dt -y + Y^3 = 0, y(0) = c, y'(0) = 0 a.)Plot a numerical solution of this equation from t = 0 to t = 40 for each of the intial values c = 0.5, 1, 1.5, 2, 2.5. Describe how increasing the intial value of y affects the solutions, both in terms of their limiting behavior and their general appearance. b.) Plot all five solutions on one graph.Explanation / Answer
function dy=myfun(t,y)
dy=zeros(2,1);
dy(1,1)=y(2);
dy(2,1)=y(1)-y(1).^3-0.15*y(2);
end
then run this scrit:
[T Y]=ode45(@myfun,[0 10],[5 0]);
plot(T,Y(:,1))
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.