the application decic is different from the predefined syntax
조회 수: 56 (최근 30일)
이전 댓글 표시
Hi There,
In the help center, the syntax of decic is
However, in the “analyze and manipulate differential algebraic equations”, the employment of decic is
decic(f,t0,[0.98;-0.21;zeros(3,1)],[],zeros(5,1),[],opt)
which is different from the predefined syntax.
댓글 수: 0
채택된 답변
Stephen23
2025년 8월 27일 4:24
편집: Stephen23
2025년 8월 27일 4:29
You are looking at the wrong function help.
The text in that example states "Then use the MATLAB decic function..." so you should be looking at the MATLAB function help https://www.mathworks.com/help/matlab/ref/decic.html which has syntax:
[y0_new,yp0_new] = decic(odefun,t0,y0,fixed_y0,yp0,fixed_yp0,options)
which exactly matches the syntax used in the example https://www.mathworks.com/help/symbolic/analyze-and-manipulate-differential-algebraic-equations.html :
[y0,yp0] = decic(f,t0,[0.98;-0.21;zeros(3,1)],[],zeros(5,1),[],opt)
This also makes sense conceptually, because the symbolic toolbox function DAEFUNCTION converts from symbolic equations to a MATLAB function handle (similarly to MATLABFUNCTION does), so we already know that the Symbolic Toolbox function DECIC (which lists its first inputs as symbolic equations and variables) is not the correct function.
You can also use WHICH to check this yourself.
댓글 수: 7
Torsten
2025년 8월 28일 14:10
편집: Torsten
2025년 8월 28일 14:17
It is absolutly necessary to prescribe the differential variables at t = t0 of your DAE system because differential variables need initial conditions. The algebraic variables or time derivatives of variables are a "nice-to-have", but if you don't specify them and the solver manages to start the integration, all should be fine.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!