input symbolic parameters in ode45
이전 댓글 표시
I want to solve symbolically an ODE using ode45. The equation is:
function dydt = findbk(t,y)
J1 = 0.2;
T0 = 0.1;
J2 = 0.1;
theta1ddot = k/J1 * (y(2) - y(1));
theta2ddot = T0/J2 - b*y(4)/J2 - (k/J2)*(y(2)-y(1));
dydt = [y(3);y(4);theta1ddot;theta2ddot];
end
Is there a way to input symbolically b and k and use:
[t,y] = ode45(@findbk,[0:0.01:10],[0,0,0,0],options);
To solve the ode?
답변 (1개)
Jan
2021년 11월 2일
0 개 추천
ODE45 integrates numerically. It does not offer a symbolic solution.
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!