I HAVE THE FOLLOWING ERROR: "Error using bvparguments" HELP ME TO FIX IT
15 次查看(过去 30 天)
显示 更早的评论
Error using bvparguments (line 108)
Error in calling BVP4C(ODEFUN,BCFUN,SOLINIT):
The derivative function ODEFUN should return a column vector of length 8.
Error in bvp4c (line 122)
bvparguments(solver_name,ode,bc,solinit,options,varargin);
Error in second (line 25)
sol =bvp4c(@shootode,@shootbc,solinit);
8 个评论
采纳的回答
Jan
2022-12-30
移动:Jan
2022-12-30
The code does not run.
- linspace(0,infinity,40) - what is "infinity" and of course you cannot divide the interval [0, Infinity] into 40 steps.
- The functions need trailing end statements if this is written in a single file.
- You provide an initial value with 8 components, but as the error message tells clearly, shootode replies 7 elements only.
更多回答(1 个)
Walter Roberson
2022-12-31
you do not initialize your global variables, so some of your calculations return empty
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Boundary Value Problems 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!