- Add a ‘Push Button’ block from the Simulink Library Browser (Simulink/Dashboard).
- Right click the “Push Button” block and click properties.
- In the Porperties console, click on the callback tab.
- Configure a callback for the Button Block under “OpneFcn” Callback using the following code snippet:

