Main Content

Create a Custom Task Function

In a project, you can create functions and run them on selected project files.

For example custom task functions, see Running Custom Tasks with a Project.

To create a custom task function:

  1. In a Project, select Custom Tasks > Manage Custom Tasks.

  2. In the Manage Custom Tasks dialog box, select Add > Add Using New Script or Add Using Existing Script .

    Either browse to an existing script, or name and save the new file on your MATLAB® path. The file is added to the project.

  3. The MATLAB Editor opens the new file containing a simple example custom task function for you to edit. Edit the function to perform the desired action on each file. The instructions guide you to create a custom task with the correct function signature. Save the file.

  4. To run your task, in the project, click Custom Tasks. In the Custom Task dialog box, select project files to include using the check boxes, select your custom task in the list, and click Run Task.

  5. After your custom task function runs, view the results in the Custom Task Report.

  6. To save the results in a file, click Publish Report.

Related Topics