フィルターのクリア

Getting Error odearguments while using ode15i

1 回表示 (過去 30 日間)
Siddharth A
Siddharth A 2021 年 1 月 8 日
回答済み: Aditya Shah 2022 年 10 月 13 日
Hey guys,
Have been getting the following error while executing my code:
Error using odearguments (line 93) MASSBAL returns a vector of length 6, but the length of initial conditions vector is 8. The vector returned by MASSBAL and the initial conditions vector must have the same number of elements. (I ain't understanding why this is happening, checked multipke times)
Error in ode15i (line 117)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, ~, odeFcn, ... (Clueless about this)
Error in DDP_Jan2 (line 126)
[z,y] = ode15i(@massbal,zspan,y0,yp0) (Clueless again)
Please find attached my code and kindly help. Will be really grateful

回答 (1 件)

Aditya Shah
Aditya Shah 2022 年 10 月 13 日
Hi!
The length of the vector returned by the ODEFUN (MASSBAL in this case) and the length of the initial conditions vector must be the same.

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by