| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Parameter arguments for Embedded MATLAB Function blocks do not take their values from signals in the Simulink model. Instead, their values come from parameters defined in a parent Simulink masked subsystem or variables defined in the MATLAB base workspace. Using parameters allows you to pass read-only constants in the Simulink model to the Embedded MATLAB Function block.
Use the following procedure to add a parameter argument to a function for an Embedded MATLAB Function block.
In the Embedded MATLAB Editor, add an argument to the function header of the Embedded MATLAB Function block.
The name of the argument must be identical to the name of the masked subsystem parameter or MATLAB variable that you want to pass to the Embedded MATLAB Function block. For information on declaring parameters for masked subsystems, see .
Bring focus to the Embedded MATLAB Function block.
The new argument appears as an input port in the Simulink diagram.
In the Embedded MATLAB Editor, select Model Explorer or Tools > Edit Data/Ports.
In the Contents pane, click the row that contains the new argument.
Examine the Embedded MATLAB Function block.
The input port no longer appears for the parameter argument.
![]() | Sizing Function Arguments | Resolving Signal Objects for Output Data | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |