merging two ode graphs
3 views (last 30 days)
Show older comments
Susmita Panda
on 6 May 2021
Commented: Susmita Panda
on 16 May 2021
I tried to merge two ode function but getting an error. The first ode ranges upto T and thereafter I want result of other ode.
0 Comments
Accepted Answer
Alan Stevens
on 8 May 2021
Your testode2 function must return a column vector. Try
function dy = testode2(~,y) %%% Must return a column vector
j=1;beta=0.025;k=j^4;c=2*j^2*beta;m=1;
f=zeros(2,1);
dy = [y(2);
(-k*y(1)/m-c*y(2)/m)];
end
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!