Can I change the output of the ode45 function?

1 view (last 30 days)
AA
AA on 19 Mar 2015
I want to use ode45 to solve a 1st order differential equation but my input parameter is a matrix, not a column vector. I get an error message that says:
" Error using odearguments (line 90) VONNEUMANN must return a column vector.
Error in ode45 (line 113) [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in First_Density_Matrix_Model (line 31) [T,Y] = ode45(@vonNeumann, tspan, y0); "
where VONNEUMANN is the differential equation I want to solve and First_Density_Matrix_Model is the programme it is being called in.
Is there any way I can change the output parameters to allow me to do this?
Thanks!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!