pauseButton

Allows user to pause MATLAB simulation.
2,4K Downloads
Aktualisiert 10. Okt 2006

Keine Lizenz

Displays a button which, if clicked, causes MATLAB to pause and ask for an expression to be entered. This expression is evaluated in the calling functions workspace, the result is displayed and then MATLAB continues running its script/simulation.

pauseButton should be called often from inside a loop in a simulation which the user may want to pause. After the first call, it takes almost zero processing time.

Useful if e.g. you are running a long simulation and suddenly decide you want to know how many five card poker hands are in a pack.

Click the pause button, enter nchoosek(52,5) at the command window prompt then press return. Matlab displays
ans =
2598960
and continues the simulation.

example usage:

for ii=1:50000
pauseButton;
for jj=1:1000
dummy=randn(100)*randn(100);
end
end

Uses almost no processing time.

Zitieren als

Murphy O'Brien (2024). pauseButton (https://www.mathworks.com/matlabcentral/fileexchange/6060-pausebutton), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0

Uses the calling functions variable space, allows you to see its variables. Fixed problem where closing it while running caused the calling function error. Now handle invisible so plotting wont plot to the button. Changed title to pause button.