ode15s works, but not with my Jacobian
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!