Create a Batch Function

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:

  1. In the Simulink Project Batch Job view, click Create.

  2. 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.

  3. 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.

  4. 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.

Related Examples

Was this topic helpful?