Set timer to display sth in certain interval

Hello everyone,
I want my timer to display dots in every 0.01 second for one second.
Thanks.

 채택된 답변

Sean de Wolski
Sean de Wolski 2013년 11월 18일

0 개 추천

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

Cagdas
Cagdas 2013년 11월 18일
thanks a lot it works. however is there any way i can display these dots horizontally?
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);
Cagdas
Cagdas 2013년 11월 18일
thank you so much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Performance and Memory에 대해 자세히 알아보기

질문:

2013년 11월 18일

댓글:

2013년 11월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by