adams中step函数的循环问题
1个回答

可以尝试一下用mod函数,比如把time改为mod(time-1.7,4.5-1.7);

循环为:step(mod(time-1.7,4.5-1.7),0,0,0.8,-16.3714d)+STEP(mod(time-1.7,4.5-1.7),0.8,0,1.3,-12.8037d)+STEP(mod(time-1.7,4.5-1.7),1.3,0,1.5,0d)+STEP(mod(time-1.7,4.5-1.7),1.5,0,2.3,41.9806d)+step(mod(time-1.7,4.5-1.7),2.3,0,2.8,-12.8055d)

如果要跳出循环的话,只需要在后面继续加上step函数,比如你要在时间为4.5+2.8秒时跳出循环,只需要在后面加上+step(time,4.5+2.8,0,_,_)就可以了;

以上只是我的个人经验,不一定有官方的标准答案好.