input symbolic parameters in ode45
Show older comments
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?
Answers (1)
Jan
on 2 Nov 2021
0 votes
ODE45 integrates numerically. It does not offer a symbolic solution.
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!