In Simulink® Project, in the Batch Job view, you can create functions and run them on selected project files.
For example batch jobs, see Running Batch Jobs with a Simulink Project.
To create a batch function:
In the Simulink Project Batch Job view, click Create.
Name and save the file on your MATLAB® path. Simulink Project adds the file to the project and makes it a batch job shortcut so it is easy to reuse.
The MATLAB Editor opens the new file containing a simple example batch job for you to edit. Edit the function to perform the desired action on each file. The instructions guide you to create a batch job with the correct function signature.
In the Batch Job view, click Select to choose your new batch job function from the list.
Similarly, you can create a batch job at the Shortcut Management node by selecting Create Action Shortcut > Batch Job Function.
To make existing batch functions into shortcuts, see Create Shortcuts to Batch Job Functions.