サーチ…


MATLABのシンプルタイマー

以下は一定の間隔で起動するタイマーです。これは、タイムアウトがで定義されますPeriod 、それはによって定義されたコールバック呼び出しTimerfcnタイムアウト時を。

t = timer;
t.TasksToExecute = Inf;
t.Period = 0.01; % timeout value in seconds
t.TimerFcn = @(myTimerObj, thisEvent)disp('hello'); % timer callback function
t.ExecutionMode = 'fixedRate';
start(t)
pause(inf);


Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow