Simulink Release Notes |
Modeling Enhancements
This section describes enhancements to Simulink dynamic system modeling tools.
Autorouting Option Added to add_line Command
The add_line
command now optionally routes lines around intervening blocks and annotations. For example, the following command autoroutes a connection between two blocks in the vdp
model.
The autorouting option is off by default. See add_line
in Using Simulink for more information.
S-Function Builder
The S-Function Builder generates an S-function from specifications that you enter in a dialog box. It provides an easy way for you to incorporate existing code into a Simulink model.
add_param, delete_param
With this version, you can add custom parameters to your block diagrams.
You can also use the model handle in place of the model name. See add_param
and delete_param
in Using Simulink for more information.
Connection Callbacks
With this version, you can use set_param
to set callbacks on ports that are triggered by changes in the ports' connectivity. The callback function parameter is named ConnectionCallback
. When the port's connectivity changes (addition/deletion of line connected to the port, connection of new block to the port, etc.), Simulink invokes the callback function with the port handle as its argument. See Port Callback Parameters in Using Simulink for more information.
Saving Block User Data in Model Files
This version adds a new block parameter, named UserDataPersistent
, that is off
by default. Setting this parameter on
, e.g.,
causes Simulink to include a block's user data (i.e., the value of the block's UserData
parameter) in the model file when you save a model. Simulink encodes the user data as ASCII characters and saves the encoded data in a new section of the model file called MatData
. This mechanism works with all forms of MATLAB data, including arrays, structures, objects, and Simulink data objects. See Associating User Data with Blocks in Using Simulink for more information.
Absolute Tolerance Enhancements
This version adds a dialog item for setting the absolute tolerance for each state in the State-Space block, the Transfer Fcn block, and the Zero-Pole block. With this enhancement, you can now specify the absolute tolerance for solving every continuous state in your model.
Block Reduction Enhancements
S-functions may now request that they be eliminated from the compiled model. To do this, call ssSetBlockReduction(true)
inside the S-function. This is an advanced feature provided for customers writing S-functions who want to optimize the generated code produced for their S-function. Graphical connectivity is now remapped during block reduction, eliminating a source of error during reduction (e.g., a memory reference error used to occur if Simulink eliminated a block connected to a scope). Block reduction is now on
by default, and a Simulink preference has been added for the option.
Boolean Logic Signals Preference
The Simulink Preferences dialog box now allows you to specify the use of Boolean logic signals by default. See Setting Simulink Preferences in Using Simulink for more information.
Subsystem Semantics Demos
Typing sl_subsys_semantics
at the MATLAB prompt now displays a set of models that illustrate the semantics of various types of subsystem blocks. The demos include formal definitions of function-call subsystems.
Enhanced Engine Model Demos
The top and bottom dead center detection in the engine
and enginewc
demo models now use a reset integrator. In previous versions, the models used a triggered subsystem to detect angular position. This method resulted in inefficiencies and a slower, less accurate solution. In addition, self-triggering subsystems are now illegal in Simulink.
Setting Block Sorting Priority on Virtual Subsystems
In Simulink 4.0, it was an error to specify a priority on a virtual subsystem. In Simulink 4.1, you can specify priorities on virtual subsystems.
Using ~ in Filenames on UNIX
Now all filename fields in Simulink support the mapping of the ~
character in filenames. For example, in a To File block, you can specify ~/outdir/file.mat
. On most systems, this will expand to /home/$USER/outdir/file.mat
.
Improved Warning About Slow Signals Feeding the Enable Port of an Enabled Subsystem Containing Fast Blocks
In a multitasking environment, deterministic results cannot be guaranteed if a slow signal feeds the enable port of an enabled subsystem that contains fast blocks. In previous versions, Simulink did not issue a warning in some cases where this may occur.
Flagging
Function-Call Subsystem Cycles
In previous versions, Simulink allowed you to build models containing function-call-cycles, i.e., function-call subsystems that directly or indirectly call themselves.
Such models cannot be correctly simulated. Accordingly, Simulink now displays an error message when you attempt to run or update a diagram containing function-call cycles.
Simulink Editor | Simulink Debugger |