input symbolic parameters in ode45

4 views (last 30 days)
Nader Mohamed
Nader Mohamed on 2 Nov 2021
Answered: Jan on 2 Nov 2021
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
Jan on 2 Nov 2021
ODE45 integrates numerically. It does not offer a symbolic solution.

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!