필터 지우기
필터 지우기

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 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