How to prevent the function within a Timer to keep displaying the answer in Command Windows?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi ALl
My code is shown as below
set(handles.edit3,'String',num2str(MyFuc(Input)));
tmr=timer('Period',10,'ExecutionMode','FixedRate',...
'TimerFcn',num2str(MyFuc(Input)));
start(tmr); % Start the timer object.
function Output=MyFuc(Input)
Output=Input*3;
end
Matlab's command window keeps display the answer from MyFuc. Anyone knows how can I stop command window displaying it?
Many Thanks,
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 2월 4일
편집: Azzi Abdelmalek
2013년 2월 4일
Try
a=MyFuc(Input);
set(handles.edit3,'String',num2str(a));
tmr=timer('Period',10,'ExecutionMode','FixedRate',...
'TimerFcn',);
start(tmr); % Start the timer object.
댓글 수: 7
Azzi Abdelmalek
2013년 2월 4일
편집: Azzi Abdelmalek
2013년 2월 4일
This is not displayed by MyFunc like you said in your question
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!