Using Simulink Previous page   Next Page

Creating an Example Embedded MATLAB Function

Use the following procedure topics to create a model with an Embedded MATLAB Function block. In the process, learn how to use Embedded MATLAB Function blocks in Simulink.

  1. Adding an Embedded MATLAB Function Block to a Model -- Start by creating a model with an Embedded MATLAB Function block.
  2. Programming the Embedded MATLAB Function -- Use the built-in diagnostics for Embedded MATLAB Function blocks to test for syntax errors in the Embedded MATLAB function body.
  3. Checking the Function for Errors -- Use the built-in diagnostics for Embedded MATLAB Function blocks to test for syntax errors in the Embedded MATLAB function body.
  4. Defining Inputs and Outputs -- Define properties for the input and output arguments of the Embedded MATLAB Function block interface with the Model Explorer tool.

Previous page  Why Use Embedded MATLAB Function Blocks? Adding an Embedded MATLAB Function Block to a Model Next page

© 1994-2005 The MathWorks, Inc.