In Simulink® Project, startup shortcuts help you set up the environment for your project.
Startup shortcut files are automatically run (.m files), loaded (.mat files), and opened (Simulink models) when you open the project.
Projects warn if you have more than one startup shortcut. Startup shortcuts run in alphabetical order. If execution order is important, consider creating one script that calls all the others, and use that script as your only startup shortcut.
Create a new startup shortcut file.
In the Shortcut Management view, click Create Action Shortcut > Startup Script.
Name and save the file. Startup shortcut scripts can have any name. You do not need to use startup.m.
The tool adds the new file to the project and sets it to Run at Startup.
Right-click the file and select Open.
Write the shortcut script using the Editor.
Configure an existing file as a shortcut to run when you open your project.
Right-click the file in the All Files or Project Files view and select Create Shortcut > General, or if you have created a shortcut group you want to use, then select Create Shortcut > GroupName. You can change shortcut group later.
Right-click the shortcut file and select Set Shortcut Action > Startup .
The Action column displays Run at Start Up.
To stop a shortcut running at startup, change back to a basic shortcut using Set Shortcut Action > None.