Main Content


Define custom procedures


The ModelAdvisor.Procedure class defines a procedure that is displayed in the Model Advisor tree. Use procedures to organize additional procedures or checks by functionality or usage.



ProcedureObject = ModelAdvisor.Procedure(ProcedureID) creates a Model Advisor procedure object, ProcedureObject and assigns it a unique identifier, ProcedureID which must remain constant.

Input Arguments

expand all

Unique identifier for the Model Advisor procedure.

Data Types: char


expand all

Provides information about the procedure. The right pane of the Model Advisor displays the procedure details.

Data Types: char

Specifies the name of the procedure that the Model Advisor displays.

Data Types: char

Specifies a permanent, unique identifier for the procedure.


  • You must specify this field.

  • The value of ID must remain constant.

  • The Model Advisor generates an error if ID is not unique.

  • Procedure definitions must refer to other procedures by ID.

Data Types: char

Specifies a handle to the current Model Advisor object.

Object Functions

addProcedureAdd subprocedure to procedure
addTaskAdd task to procedure


collapse all

  1. Create a ModelAdvisor.Procedure object named MAP.

    MAP = ModelAdvisor.Procedure('com.mathworks.sample.ProcedureSample');

  2. Create three subprocedures.

  3. Add three procedures to MAP.

    addProcedure(MAP, MAP1);
    addProcedure(MAP, MAP2);
    addProcedure(MAP, MAP3);

Version History

Introduced in R2006a