フィルターのクリア

How to change values during the solving ode

2 ビュー (過去 30 日間)
Cécile Moulin
Cécile Moulin 2016 年 10 月 19 日
Hi,
I want to know how I can change the value of a vector during the integration. For instance, every 5 minutes, add 3 to y(2)...
I found a solution for t==t1 : use events in the ode options (see the file test_ball.m the name comes from ballode.m) but if I want to do the same for 5, 10, 15 etc it doesn't work... I changed value = t -5 in mod(t,5) and in (t>0 && mod(t,5)==0)-1 without success.
Thanks and sorry for the mistakes.
Ccile

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by