Execute MATLAB code based on user input
Simulink / Dashboard
The Callback Button block executes MATLAB® code based on user input. The Callback Button block reacts to clicks and presses from the user. You can specify separate code to execute for each action. The Callback Button block repeats the code specified for the press action at a specified rate as long as you continue to press the button.
The Callback Button block registers a click when you release the left mouse button with the cursor on the Callback Button. The code for a press executes when you click the Callback Button and hold for the specified Press Delay.
Double-clicking the Callback Button block does not open its dialog box during simulation and when the block is selected. To edit the block's parameters, you can use the Property Inspector, or you can right-click the block and select Block Parameters from the context menu.
Data Types | |
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|