Guy on Simulink

Simulink & Model-Based Design

Making things easier

With every release, we add new capabilities to improve the usability of Simulink. In R2011a, there is a good list of enhancements that should make your life a little bit easier. Here are a few examples:

Creating protected models via right-click

In R2009b, protected model reference was introduced. To use this feature, you had to use the Simulink.ModelReference.protect command to generate the protected model, then drag a model reference block from the Simulink Library and specify the name of the newly created file.

In R2011a, all you have to do is right-click on the Model Reference block to protect and select Code Generation -> Generate Protected Model.

Protecting a referenced model

A protected model is saved in the current directory and a new model is created with a Model Reference block already configured.

Creating MATLAB structures from the Bus Editor

Since R2010a, it is possible to use a MATLAB structure to specify initial conditions of a bus signal. When you have a bus object in the workspace, you can use Simulink.Bus.createMATLABStruct to automatically create the structure. In R2011a, a menu item and a toolbar button have been added to the Bus Editor to invoke Simulink.Bus.createMATLABStruct:

Creating a MATLAB Structure from the Bus Editor

Model Reference Parameter dialog box displays model names of all variant choices

Model Reference Variants were introduced in R2009b. Before R2011a, the table of variant choices had 2 columns: Variant object and Condition. This means that to see the associated model on the right, you had to click on each variant individually:

pre R2010b Model Reference Parameter dialog box

In R2011a, a column has been added to see the model associated with each variant:

Improved R2011a Model Reference Parameter dialog box

Now it's your turn

Are you going to take advantage of these enhancements? Do you have suggestions to improve the usability of Simulink? Leave a comment here.

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.