How to Output Updated Parameters Value in ode Integration Process When the odeEvent is triggered ?
古いコメントを表示
I was working on multi-body systems collision simulation utilize ode MATLAB function and odeEvent function.
The impact between two body was built as a event using odeEvent MATLAB function.
The impact event will change some parameters which are incorporated in the governing equations of motion such as ydot=f(t,y,P).
I want to output the updated parameters when the impact event is triggered using fprintf function in the EventCallback function illustrated as follows :
function [stop,Ye,Pout] = impactEventCallback(te,ye,ie,Pin)
% ... parameters updating process
fprintf("The updated parameters are : %e", Pout)
end
However, when I simulate the impact process, there is no output display.
Can anyone give me some advices about how to output parameters when the impact event is triggered.
3 件のコメント
Chuguang Pan
2024 年 12 月 27 日
charan
2024 年 12 月 27 日
Hi Chuguang,
Did you try with the "Response" parameter set to "callback"?
Chuguang Pan
2024 年 12 月 27 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!