Ode15s and function containing system of odes
Hi i have 3 transient pdes(descritized in 2d space using method of lines) represnted as 3 matrix (uep,Ro,c_o) and i want to solve them simultaneously by ode15s.
Function dC=fun(t,C)
%system of odes
end Solver is :
[t,C]=ode15s(@fun,tspan,initialvalues)
I have 2 questions : 1. does ode15s call fun(t,C) in each time step? 2.i want to update my 3 matrices in each time step using C A)Is C the answer of pdes in each time step? B)Is C passed over ot fun(t,C) as a vector or more percisely what is the dimensions of C in each step ? (or Does it's size change as solution goes forward in time?)
I'm asking these questions cause i need to update my matrices each step using the answer of pdes in previous step so i wanted to write something like this:
uep(2:10,1:19)=reshape(C(1:171),[9 19])
And so on.
Thanks in advance
2 Comments
Accepted Answer
More Answers (0)
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!