I HAVE THE FOLLOWING ERROR: "Error using bvparguments" HELP ME TO FIX IT
조회 수: 14 (최근 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
Torsten
2023년 1월 3일
편집: Torsten
2023년 1월 3일
In the code you posted above, there is a third free parameter p that is to be adjusted so that all three instead of only two boundary conditions can be satisfied. Your original problem - which you deleted for some resason - did not contain such a free parameter.
채택된 답변
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!