- Click on any area of of your Simulink model, and write any text you want (the name of the script you want to run for example)
- select this text and right click and choose properties
- choose ClickFcn, add the name of your script
- When you click on the text you've created, you will run your script
- right click on your model
- choose model properties
- then choose init fcn and add the name of your script or any lines of code