Who can help me with this please?
1 view (last 30 days)
Show older comments
function [dy] = quest1(t,y)
dy1= zeros(2,1)
dy(1) = y(2);
dy(2) = -2*y(2)-2*y(1)+(1*sin(2*t));
[t,Y] = ode23(@quest1,[0 10],[2 -3]);
figure(1)
plot(t,Y(:,1));
1 Comment
Rik
on 19 Apr 2021
Since you didn't give any plausible inputs:
dy1= zeros(2,1);
dy(1) = y(2);
dy(2) = -2*y(2)-2*y(1)+(1*sin(2*t));
[t,Y] = ode23(@quest1,[0 10],[2 -3]);
figure(1)
plot(t,Y(:,1));
The next error would be the missing quest1 function, followed by the error you're getting.
You can find guidelines for posting homework on this forum here. If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). If your main issue is with understanding the underlying concept, you may consider re-reading the material you teacher provided and ask them for further clarification.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!