ode45,ODE23 , force is not a time dependent function
Show older comments
Hi;
As you can see in the code ; normally for ODE23 I was defining the force with time such as Fy=@(t) Fyr*sin(w*t);
But now the force values are given in the excel and I couldn't understand how can I apply force now?
To solve ode23, as in F=[....], Fy(t), Fz(t) and Mt(t) depend on t, but this time I have force values and they are not functions.
What should I do?
Accepted Answer
More Answers (1)
Sam Chak
on 27 May 2022
1 vote
Hi Gloria
You can load data on Excel to Workspace and then use the function interp1(t,Fy,Ts) to interpolate the data set (t,Fy) at simulation time Ts. For more info, check out the link:
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!