How to prevent the function within a Timer to keep displaying the answer in Command Windows?
Afficher commentaires plus anciens
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,
Réponses (1)
Azzi Abdelmalek
le 4 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 4 Fév 2013
Try
a=MyFuc(Input);
set(handles.edit3,'String',num2str(a));
tmr=timer('Period',10,'ExecutionMode','FixedRate',...
'TimerFcn',);
start(tmr); % Start the timer object.
7 commentaires
Zheng
le 4 Fév 2013
Azzi Abdelmalek
le 4 Fév 2013
What did you get when you type in matlab command
a=MyFuc(Input);
Zheng
le 4 Fév 2013
Azzi Abdelmalek
le 4 Fév 2013
Maybe you did not use the edited answer
a=MyFuc(Input);
set(handles.edit3,'String',num2str(a));
Zheng
le 4 Fév 2013
Azzi Abdelmalek
le 4 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 4 Fév 2013
This is not displayed by MyFunc like you said in your question
Zheng
le 4 Fév 2013
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!