ode15s works, but not with my Jacobian
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi!
Thanks for looking at the problem!
Part of the code:
options=odeset('Jacobian',@J);
[tn,C]=ode15s(@F,[tinitial tfinal], C0, options);
The functions are defined with variables: J(tn,C) and F(tn,C)
1. When I don't use options, my system is solved fine.
2. When I do use the option to include the Jacobian, the following error occurs:
Error using *
Inner matrix dimensions must agree.
Error in ode15s (line 387)
DfDt = dfdt + dfdy*yp;
Error in myprogram (line 23)
[tn,C]=ode15s(@F,[tinitial tfinal], C0, options);
I used keyboard to see if the function Jacobian is being called. This is not the case. Where could the error come from then?
Thanks a lot in advance!
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!