Hi everyone im trying to solve a system of coupled ordinary differential equations using ODE45 and i keep getting this error:
Error using odearguments (line 90)
ODE_SYS must return a column vector.
Error in ode45 (line 113)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0,
odeArgs, odeFcn, ...
Error in solvingodesys (line 5)
[zsol,varsol]=ode45(@ode_sys,range,ICs);
i put my code in the attachment PDF for you guys to help me find my error thanks

 채택된 답변

Star Strider
Star Strider 2020년 8월 15일

0 개 추천

just before the end call, add:
diffeqs = diffeqs(:);
That should at least solve the ‘column vector’ error, since ‘diffeqs’ is currently coded to produce a row vector (assuming all of the elements are scalars, since I only looked at your code and did not run it).

댓글 수: 2

Ayman Jumma
Ayman Jumma 2020년 8월 15일
Thank you very much, now my code runs
Star Strider
Star Strider 2020년 8월 15일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기

태그

질문:

2020년 8월 15일

댓글:

2020년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by