Matlab定时器

t1=timer('TimerFcn','my_fun_calBeamShapeChange','Period',60,'ExecutionMode','fixedSpacing','TasksToExecute',2);

start(t1);

TimerFcn:后面是定时器回调函数

Period:周期

ExecutionMode:执行模式

TasksToExecute:执行次数,如果希望一直执行就不要这个,但一定要加Period