waitforbuttonpress
Wait for click or key press.
📝Syntax
w = waitforbuttonpress()
📤Output Arguments
Parameter Description
w a scalar double value: 0 for mouse button pressed, 1 for key pressed.
📄Description

w = waitforbuttonpress() pauses the execution of code until the user interacts with the current figure by either clicking a mouse button or pressing a key.

💡Examples
cf = gcf();
w = waitforbuttonpress;
axes;
🔗See Also
figuregcf
🕔Version History
Version Description
1.7.0 initial version
Edit this page on GitHub