how to select function output in ode solver
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have a function that returns a (3xN ) matrix in which each column corresponds to three coupled differential equations which i want to solve using an ode solver, how do i extract each column of the output of the function separately so I can run N ode solvers to solve each of the equations? Ive tried the below where g is my function and ret is the (3xN) output matrix from the function g?
for j=1:N
[t,x] = ode45(@g((ret(1,N),ret(2,N),ret(3,N))),tspan,x0);
end
thanks
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!