How can I stop/halt script (1) , get prompt and execute script(2), once done return to script(1)?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am looking to have "Press to Continue" button , while the control is at the Command Window prompt.
I could simply set the " keyboard " ,and once done set "return".
Example:
%=================================
for i=1:20; % Perform the following statements 20 times
disp( ' M ' );
keyboard; % Press "return" from prompt
end
%=====================================
When I halt/pause the "for loop " execution by " keyboard " command, I run a bunch of additional code or m.file script , my primer script using SOC to control equipment, etc....need to stay in last operation. Once done ( run script (2)) I would like to toggle a button to continue , basically to perform " return" function , callback of this button .
%=====================================
figH = figure;
uicontrol('Style', 'pushbutton', 'Callback', '????????(????)'); % ????????
for i=1:20; % Perform the following statements 20 times
disp( ' M ' );
% insted of ==>keyboard;
drawnow; % %
xxxxxx(figH); % % Halt and Set the prompt command window
% Click Button =[send "return" ] ,insted of
% typing in the prompt
end
%===============================================
0 commentaires
Réponses (1)
Walter Roberson
le 14 Jan 2013
Try adding a
return
command in your script. (Note: I would not expect this to work if it was a function you were running instead of a script.)
0 commentaires
Voir également
Catégories
En savoir plus sur Desktop dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!