필터 지우기
필터 지우기

ode45,ODE23 , force is not a time dependent function

조회 수: 2 (최근 30일)
Gloria
Gloria 2022년 5월 27일
댓글: Gloria 2022년 5월 27일
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?

채택된 답변

Walter Roberson
Walter Roberson 2022년 5월 27일
If you have external impulses, then none of the ode* functions can be used for the entire timespan, unless the forces can be interpolated with degree two or more, such as using interp1 'spline'.
If they cannot be made smooth enough then you need to stop the ode* function at the each location that fails C2 continuity.
This is because the mathematics of optimal point selection to calculate new points from is dependent upon intepolating polynomials that require continuity.

추가 답변 (1개)

Sam Chak
Sam Chak 2022년 5월 27일
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:

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by