Set timer to display sth in certain interval
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Cagdas
el 18 de Nov. de 2013
Comentada: Cagdas
el 18 de Nov. de 2013
Hello everyone,
I want my timer to display dots in every 0.01 second for one second.
Thanks.
0 comentarios
Respuesta aceptada
Sean de Wolski
el 18 de Nov. de 2013
T = timer('Period',0.01,... %period
'ExecutionMode','fixedRate',... %{singleShot,fixedRate,fixedSpacing,fixedDelay}
'BusyMode','drop',... %{drop, error, queue}
'TasksToExecute',100,...
'StartDelay',0,...
'TimerFcn',@(src,evt)disp('.'),...
'StartFcn',[],...
'StopFcn',[],...
'ErrorFcn',[]);
start(T);
3 comentarios
Sean de Wolski
el 18 de Nov. de 2013
So:
T = timer('Period',0.01,... %period
'ExecutionMode','fixedRate',... %{singleShot,fixedRate,fixedSpacing,fixedDelay}
'BusyMode','drop',... %{drop, error, queue}
'TasksToExecute',100,...
'StartDelay',0,...
'TimerFcn',@(src,evt)fprintf(1,'.'),...
'StartFcn',@(src,evt)fprintf(1,'\n'),...
'StopFcn',@(src,evt)fprintf(1,'\n'),...
'ErrorFcn',[]);
start(T);
Más respuestas (0)
Ver también
Categorías
Más información sobre Performance and Memory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!