Simulink Release Notes Prior to R2011b


View release notes for newer releases

R2011a

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Restore SimState in Models Created in Earlier Simulink Versions

Simulink® 7.7 supports the restoring of a SimState from a MAT file saved in a previous version of Simulink. During this operation, Simulink restores as much of the SimState object as possible and automatically resets the simulation start time to the stop time of the SimState object.

You can choose to receive a warning or an error by setting a new diagnostic, SimState object from earlier release, on the Diagnostic Pane of the Configuration Parameters dialog.

Improved Absolute Tolerance Implementation

The processing of the absolute tolerance parameter in the Solver configuration pane, and of the absolute tolerance parameters for continuous blocks and S-functions with continuous states, has been enhanced. As a result, these parameters provide a more robust and consistent behavior. These error tolerances are used by variable-step solvers to control integration error for continuous states in a model.

A new SimStruct function ssSetStateAbsTol has been introduced to allow for setting the absolute tolerances for the S-Function continuous states in models using a variable-step solver. Use of ssGetAbsTol to either get or set absolute tolerances is not recommended. Instead, use ssGetStateAbsTol and ssSetStateAbsTol to get and set tolerances, respectively.

Component-Based Modeling

Refreshing Linked Blocks and Model Blocks

You can refresh linked blocks and Model blocks in a library or model using the Simulink Editor. Select the Edit > Links and Model Blocks > Refresh.

Refreshing the linked blocks updates the linked blocks to reflect any changes to the original library block. In releases before R2011a, to update linked blocks, you had to take one of the following actions:

  • Close and reopen the library that contains the linked blocks that you want to refresh.

  • Update the diagram (Edit > Links and Update Diagram or Ctrl+D).

You can update a specific Model block by right-clicking the Model block and selecting Refresh.

Compatibility Considerations

The new menu option, Edit > Links and Model Blocks > Refresh menu item replaces Edit > Model Blocks > Refresh Model Blocks. Both the old and new options update Model blocks in the same way.

Enhanced Model Block Displays Variant Model Choices

The Model Variants block now displays model names for all variant choices, making it easier to select and configure available variants.

Creating a Protected Model Using the Simulink Editor

You can protect a model using the Simulink Editor. Right-click the Model block that references the model for which you want to generate protected model code. In the context menu, select Code Generation > Generate Protected Model. For details, see Creating a Protected Model.

In earlier releases, you had to use the Simulink.ModelReference.protect command to create a protected model.

MATLAB Function Blocks

Embedded MATLAB Function Block Renamed as MATLAB Function Block

In R2011a, Embedded MATLAB Function blocks were renamed as MATLAB Function blocks in Simulink models. The block also has a new look:

Compatibility Considerations

If you have scripts that refer to Embedded MATLAB library blocks by path, you need to update the script to reflect the new block name. For example, if your script refers to simulink/User-Defined Functions/Embedded MATLAB Function or eml_lib/Embedded MATLAB Function, change Embedded MATLAB Function to MATLAB Function.

Support for Buses in Data Store Memory

MATLAB Function blocks now support buses as shared data in Data Store Memory blocks.

Simulink Data Management

Signal Logging Selector

The Signal Logging Selector is a new centralized signal logging tool for:

  • Reviewing all signals in a model hierarchy that are configured for logging (set with the Signal Properties dialog box)

  • Overriding signal logging settings for specific signals

  • Controlling signal logging throughout a model reference hierarchy in a more streamlined way than in previous releases

You can use the Signal Logging Selector with Simulink and Stateflow® signals.

To open the Signal Logging Selector, in the Configuration Parameters > Data Import/Export pane, select the Signal Logging Selector button. For a Model block, you can right-click the block and select the Log Referenced Signals menu item. (The Signal Logging Selector replaces the Model Reference Signal Logging dialog box.)

Dataset Format Option for Signal Logging Data

You can now select a format for signal logging data. Use the Configuration Parameters > Data Import/Export > Signal logging format parameter to select the format:

The Dataset format:

  • Uses MATLAB® timeseries objects to store logged data (rather than Simulink.Timeseries and Simulink.TsArray objects). MATLAB timeseries objects allow you to work with logging data in MATLAB without a Simulink license.

  • Supports logging multiple data values for a given time step, which can be important for Iterator subsystem and Stateflow signal logging.

  • Provides an easy-to-analyze format for logged signal data for models with deep hierarchies, bus signals, and signals with duplicate or invalid names.

  • Supports the Simulation Data Inspector.

  • Avoids the limitations of the ModelDataLogs format. For example, for a virtual bus, ModelDataLogs format logs only one of multiple signals that share the same source block. For a description of ModelDataLogs format limitations, see Bug Report 495436.

To convert a model that contains referenced models to use the Dataset format throughout the model reference hierarchy, use the Simulink.SimulationData.updateDatasetFormatLogging function.

If you have logged signal data in the ModelDataLogs format, you can use the Simulink.ModelDataLogs.convertToDataset function to convert the ModelDataLogs data to Dataset format.

To work with Dataset format data, you can use properties and methods of the following classes:

For information about the signal logging format, see Specifying the Signal Logging Data Format

From File Block Supports Zero-Crossing Detection

The From File block allows you to specify zero-crossing detection.

Signal Builder Block Now Supports Virtual Bus Output

You can now define the type of output to use on the Signal Builder block now outputs signals. With this release, the Signal Builder block has two options:

  • Ports

    Sends individual signals from the block. An output port named Signal N appears for each signal N. This option is the default setting. In previous releases, the block uses this type of signal output.

  • Bus

    Sends single, virtual, nonhierarchical bus of signals from the block. An output port named Bus appears. This Bus option enables you to change your model layout without having to reroute Signal Builder block signals. You cannot use this option to create a bus of nonvirtual signals.

For more information, see Defining Signal Output in the Simulink User's Guide

Signal Builder Block Now Shows the Currently Active Group

The Signal Builder block now shows the currently active group on its block mask.

signalbuilder Function Change

The signalbuilder function has a new command, 'annotategroup'. This command enables the display of the current group name on the Signal Builder block mask.

Range-Checking Logic for Fixed-Point Data During Simulation Improved

The logic that Simulink uses to check whether design minimum and maximum values are within the specified data type range is now consistent with the logic that it uses to calculate best-precision scaling.

  • Simulink now checks both real-world values and quantized values for a block parameter, Simulink.Parameter object, or Simulink.Signal object against design minimum and maximum values. Prior to R2011a, Simulink checked only real-world values against design minimum and maximum values.

  • When Simulink checks the design minimum and maximum values for a Simulink.Signal object against the data type minimum and maximum values, it obtains the data type range in one of the following ways.

    1. If the data type for a Simulink.Signal object is set, Simulink uses the range defined in the specification of that data type

    2. If the data type for a Simulink.Signal object is set to auto, Simulink uses the range for the data type inferred from the initial value of the signal's fi object

    Prior to R2011a, Simulink only used the data type range defined in the specification of that data type.

  • Simulink now checks the run-time parameter value of an S-function against the design minimum and maximum values when the parameter is updated at run-time and during compilation. Prior to R2011a, Simulink checked run-time parameter values of an S-function against the design minimum and maximum only at run-time.

For more information about block parameter range checking, see Checking Parameter Values.

Compatibility Considerations

  • An error is generated if the quantized value of a block parameter, Simulink.Parameter object, or Simulink.Signal object in your model is different from the real-world value and if this difference causes the quantized value to lie outside the design minimum and maximum range.

  • An error is generated if the initial value of a Simulink.Signal object in your model is a fi object and if this initial value is outside the range associated with that fi object.

  • An error is generated at compile time if the run-time parameter value of an S-function in your model is outside the design minimum and maximum range.

Data Object Wizard Now Supports Boolean, Enumerated, and Structured Data Types for Parameters

In this release, the Data Object Wizard is enhanced to suggest parameter objects for variables with the following data types:

  • Boolean

  • Enumerations

  • Structures

Error Now Generated When Initialized Signal Objects Back Propagate to Output Port of Ground Block

Prior to this release, Simulink generated an error when the output of a Ground block was a signal object with an initial value, but did not do the same for such signal objects back propagated to the output port of a Ground block. As of R2011a, Simulink generates an error under both conditions.

No Longer Able to Set RTWInfo or CustomAttributes Property of Simulink Data Objects

You can no longer set the RTWInfo or CustomAttributes property of a Simulink data object from the MATLAB Command Window or a MATLAB script. Attempts to set these properties generate an error.

Although you cannot set RTWInfo or CustomAttributes, you can still set subproperties of RTWInfo and CustomAttributes.

Compatibility Considerations

Operations from the MATLAB Command Window or a MATLAB script, which set the data object property RTWInfo or CustomAttributes, generate an error.

For example, a MATLAB script might set these properties by copying a data object as shown below:

a = Simulink.Parameter;
b = Simulink.Parameter;
b.RTWInfo = a.RTWInfo;
b.RTWInfo.CustomAttributes = a.RTWInfo.CustomAttributes;
 .
 .
 .

To copy a data object, use the object's deepCopy method.

a = Simulink.Parameter;
b = a.deepCopy;
.
.
.

Global Data Stores Now Treat Vector Signals as One or Two Dimensional

Simulink now uses the Dimensions attribute of a source signal object to determine whether to register a global data store as a vector (1-D) or matrix (2-D). For example, if the Dimensions attribute of a source signal object is set to [1 N] or [N 1], Simulink registers the global data store as a matrix. Prior to R2011a, Simulink treated all global data stores as vectors.

The following table lists possible signal object dimension settings with what Simulink registers for a corresponding global data store:

Source Signal Object DimensionsRegistered for Global Data Store
–1Get dimensions from InitialValue and interpret vectors as 1-D
NVector with N elements
[1 N]1xN matrix
[N 1]Nx1 matrix

Compatibility Considerations

If you specify the dimensions of the source signal object for a global data store as [1 N] or [N 1], Simulink now registers the data store as a matrix. Although this change has no impact on numeric results of simulation or execution of generated code, the change can affect the following:

  • Propagation of dimensions (for example, signals might propagate as [1 N] or [N 1] instead of N).

  • Signal and state logging

    • Vectors are logged as 2D matrices – [nTimeSteps width]

    • 2-D matrices are logged as 3-D matrices – [M N nTimeSteps]

No Longer Able to Use Trigger Signals Defined as Enumerations

You can no longer use trigger signals that are defined as enumerations. A trigger signal represents an external input that initiates execution of a triggered subsystem. Prior to R2011a, Simulink supported enumerated trigger signals for simulation, but produced an error during code generation. This change clarifies triggered subsystem modeling semantics by making them consistent across simulation and code generation.

Compatibility Considerations

Use of enumerated trigger signals during simulation now generates an error. To work around this change, compare enumeration values, as appropriate, and apply the resulting Boolean or integer signal value as the subsystem trigger.

Conversions of Simulink.Parameter Object Structure Field Data to Corresponding Bus Element Type Supported for double Only

If you specify the DataType field of a Simulink.Parameter object as a bus, you must specify Value as a numeric structure. Prior to R2011a, Simulink would convert the data types of all fields of that structure to the data types of corresponding bus elements. As of R2011a, Simulink converts the data type of structure fields of type double only. If the data type of a field of the structure does not match the data type of the corresponding bus element and is not double, an error occurs.

This change does not affect the InitialValue field of Simulink.Signal objects. Data types of fields of a numeric structure for an initial condition must match data types of corresponding bus elements.

Compatibility Considerations

If the data type of a field of a numeric structure that you specify for Simulink.Parameter does not match the data type of the corresponding bus element and is not double, an error occurs. To correct the condition, set the data types of all fields of the structure to match the data types of all bus elements or set them to type double.

For more information, see Simulink.Parameter.

Simulink.CustomParameter and Simulink.CustomSignal Data Classes To Be Deprecated in a Future Release

In a future release, data classes Simulink.CustomParameter and Simulink.CustomSignal will no longer be supported because they are equivalent to Simulink.Parameter and Simulink.Signal.

Compatibility Considerations

If you use the data class Simulink.CustomParameter or Simulink.CustomSignal, Simulink posts a warning that identifies the class and describes one or more techniques for eliminating it. You can ignore these warnings in R2011a, but consider making the described changes now because the classes will be removed in a future release.

Parts of Data Class Infrastructure No Longer Available

Simulink has been generating warnings for usage of the following data class infrastructure features for several releases. As of R2011a, the features are no longer supported.

  • Custom storage classes not captured in the custom storage class registration file (csc_registration) – warning displayed since R14SP2

  • Built-in custom data class attributes BitFieldName and FileName+IncludeDelimiterwarning displayed since R2008b

    Instead of...Use...
    BitFieldNameStructName
    FileName+IncludeDelimiterHeaderFile

  • Initial value of MPT data objects inside mpt.CustomRTWInfoSignalwarning displayed since R2006a

Compatibility Considerations

  • When you use a removed feature, Simulink now generates an error.

  • When loading a MAT-file that uses an unsupported feature, the load operation suppresses the generated error such that it is not visible. In addition, MATLAB silently deletes data that had been associated with the unsupported feature. To prevent loss of data when loading a MAT-file, load and resave the file with R2010b or earlier.

Simulink Signal Management

Data Store Support for Bus Signals

The following blocks support the use of bus and array of buses signals with data stores:

Benefits of using buses and arrays of buses with data stores include:

  • Simplifying the model layout by associating multiple signals with a single data store

  • Producing generated code that represents the data store data as structures that reflect the bus hierarchy

  • Writing to and reading from data stores without creating data copies, resulting in more efficient data access

Compatibility Considerations

Pre-R2011a models that use data stores work in R2011a without any modifications.

To save a model that uses buses with data stores to a pre-R2011a version, you need to restructure that model to not rely on using buses with data stores.

Accessing Bus and Matrix Elements in Data Stores

You can select specific bus or matrix elements to read from or write to a data store. To do so, use the Element Selection pane of the Data Store Read block and the Element Assignment pane of the Data Store Write block. Selecting bus or matrix elements offers the following benefits:

  • Reducing the number of blocks in the model. For example, you can eliminate a Data Store Read and Bus Selector block pair or a Data Store Write and Bus Assignment block pair for each specific bus element that you want to access.

  • Faster simulation of models with large buses and arrays of buses.

Array of Buses Support for Permute Dimensions, Probe, and Reshape Blocks

The following blocks now support the use of an array of buses as an input signal:

For details about arrays of buses, see Combining Buses into an Array of Buses.

Using the Bus Editor to Create Simulink.Parameter Objects and MATLAB Structures

You can use the Bus Editor to:

  • Define or edit a Simulink.Parameter object with a bus object for its data type. In the Bus Editor, select the parameter and use one of these approaches:

    • Select the File > Create/Edit a Simulink.Parameter object menu item.

    • Click the Create/Edit a Simulink.Parameter object icon ( ) from the toolbar.

    You can then edit the Simulink.Parameter object in the MATLAB Editor.

  • Invoke the Simulink.Bus.createMATLABStruct function for a bus object for which you want to create a full MATLAB structure. In the Bus Editor, select the bus object and use one of these approaches:

    • Select the File > Create a MATLAB structure menu item.

    • Click the Create a MATLAB structure icon ( ) from the toolbar.

    You can then edit the MATLAB structure in the MATLAB Editor.

Block Enhancements

Lookup Table, Lookup Table (2-D), and Lookup Table (n-D) Blocks Replaced with Newer Versions in the Simulink Library

In R2011a, the following lookup table blocks have been replaced with newer versions, which differ from the previous versions as follows:

BlockEnhancements to the Previous VersionOther Changes

Lookup Table

  • Default integer rounding mode changed from Floor to Simplest

  • Support for the following features:

    • Specification of parameter data types different from input or output signal types

    • Reduced memory use and faster code execution for nontunable breakpoints with even spacing

    • Cubic-spline interpolation and extrapolation

    • Table data with complex values

    • Fixed-point data types with word lengths up to 128 bits

    • Specification of data types for fraction and intermediate results

    • Specification of index search method

    • Specification of diagnostic for out-of-range inputs

Lookup Table (2-D)

  • Default integer rounding mode changed from Floor to Simplest

  • Support for the following features:

    • Specification of parameter data types different from input or output signal types

    • Reduced memory use and faster code execution for nontunable breakpoints with even spacing

    • Cubic-spline interpolation and extrapolation

    • Table data with complex values

    • Fixed-point data types with word lengths up to 128 bits

    • Specification of data types for fraction and intermediate results

    • Specification of index search method

    • Specification of diagnostic for out-of-range inputs

  • Check box for Require all inputs to have the same data type now selected by default

Lookup Table (n-D)

  • Default integer rounding mode changed from Floor to Simplest

When you load models from earlier versions of Simulink that contain the Lookup Table, Lookup Table (2-D), and Lookup Table (n-D) blocks, those versions of the blocks appear. In R2011a, the new versions of the lookup table blocks appear only when you drag the blocks from the Simulink Library Browser into new models.

When you use the add_block function to programmatically add the Lookup Table, Lookup Table (2-D), or Lookup Table (n-D) blocks to a model, those versions of the blocks appear. If you want to add the new versions of the blocks to your model, change the source block path for add_block as follows:

BlockOld Block PathNew Block Path
Lookup Table simulink/Lookup Tables/Lookup Tablesimulink/Lookup Tables/1-D Lookup Table
Lookup Table (2-D)simulink/Lookup Tables/Lookup Table (2-D)simulink/Lookup Tables/2-D Lookup Table
Lookup Table (n-D)simulink/Lookup Tables/Lookup Table (n-D)simulink/Lookup Tables/n-D Lookup Table

To upgrade your model to use new versions of the Lookup Table and Lookup Table (2-D) blocks, follow these steps:

StepDescriptionReason
1

Run the Simulink Model Advisor check for Check model, local libraries, and referenced models for known upgrade issues requiring compile time information.

Identify blocks that do not have compatible settings with the new 1-D Lookup Table and 2-D Lookup Table blocks.

2

For each block that does not have compatible settings:

  • Decide how to address each warning.

  • Adjust block parameters as needed.

Modify each Lookup Table or Lookup Table (2-D) block to make them compatible with the new versions.

3

Repeat steps 1 and 2 until you are satisfied with the results of the Model Advisor check.

Ensure that block replacement works for the entire model.

4

Run the slupdate function on your model.

Perform block replacement with the 1-D Lookup Table and 2-D Lookup Table blocks.

Note that after block replacement, the block names that appear in the model remain the same. However, the block icons match the new ones for the 1-D Lookup Table and 2-D Lookup Table blocks.

Compatibility Considerations

The Model Advisor check groups all Lookup Table and Lookup Table (2-D) blocks into three categories:

  • Blocks that have compatible settings with the new 1-D Lookup Table and 2-D Lookup Table blocks

  • Blocks that have incompatible settings with the new 1-D Lookup Table and 2-D Lookup Table blocks

  • Blocks that have repeated breakpoints

Blocks with Compatible Settings

When a block has compatible parameter settings with the new block, automatic block replacement can occur without backward incompatibilities.

Lookup Method in the Lookup Table or Lookup Table (2-D) BlockParameter Settings in the New Block After Automatic Block Replacement
InterpolationExtrapolation
Interpolation-ExtrapolationLinearLinear
Interpolation-Use End ValuesLinearClip
Use Input BelowFlatNot applicable

Depending on breakpoint characteristics, the new block uses one of two index search methods.

Breakpoint Characteristics in the Lookup Table or Lookup Table (2-D) BlockIndex Search Method in the New Block After Automatic Block Replacement
Not evenly spacedBinary search
Evenly spaced and tunableA prompt appears, asking you to select Binary search or Evenly spaced points.
Evenly spaced and not tunable

The new block also adopts other parameter settings from the Lookup Table or Lookup Table (2-D) block. For parameters that exist only in the new block, the following default settings apply after block replacement:

Parameter in the New BlockDefault Setting After Block Replacement
Breakpoint data typeInherit: Same as corresponding input
Diagnostic for out-of-range inputNone

Blocks with Incompatible Settings

When a block has incompatible parameter settings with the new block, the Model Advisor shows a warning and a recommended action, if applicable.

  • If you perform the recommended action, you can avoid incompatibility during block replacement.

  • If you use automatic block replacement without performing the recommended action, you might see numerical differences in your results.

Incompatibility WarningRecommended ActionWhat Happens for Automatic Block Replacement

The Lookup Method is Use Input Nearest or Use Input Above. The new block does not support these lookup methods.

Change the lookup method to one of the following:

  • Interpolation - Extrapolation

  • Interpolation - Use End Values

  • Use Input Below

The Lookup Method changes to Interpolation - Use End Values.

In the new block, this setting corresponds to:

  • Interpolation set to Linear

  • Extrapolation set to Clip

You also see a message that explains possible numerical differences.

The Lookup Method is Interpolation - Extrapolation, but the input and output are not the same floating-point type. The new block supports linear extrapolation only when all inputs and outputs are the same floating-point type.

Change the extrapolation method or the port data types of the block.

The block uses small fixed-point word lengths, so that interpolation uses only one rounding operation. The new block uses two rounding operations for interpolation.

None

You see a message that explains possible numerical differences.

Blocks with Repeated Breakpoints

When a block has repeated breakpoints, the Model Advisor recommends that you change the breakpoint data and rerun the check. You cannot perform automatic block replacement for blocks with repeated breakpoints.

Magnitude-Angle to Complex Block Supports CORDIC Algorithm and Fixed-Point Data Types

The Magnitude-Angle to Complex block now supports the following parameters:

The benefits of the new block parameters are as follows:

New Block ParameterPurposeBenefit
Approximation method

Specify the type of approximation the block uses to compute output: None or CORDIC.

Enables you to use a faster method of computing block output for fixed-point and HDL applications.

Number of iterations

For the CORDIC algorithm, specify how many iterations to use for computing block output.

Enables you to adjust the precision of your block output.

Scale output by reciprocal of gain factor

For the CORDIC algorithm, specify whether or not to scale the real and imaginary parts of the complex output.

Provides a more accurate numerical result for the CORDIC approximation.

This block now accepts and outputs fixed-point signals when you set Approximation method to CORDIC.

Trigonometric Function Block Supports Complex Exponential Output

The Trigonometric Function block now supports complex exponential output: cos + jsin. This function works with the CORDIC algorithm.

This block also accepts inputs with unsigned fixed-point data types when you use the CORDIC approximation. In previous releases, only signed fixed-point inputs were supported.

Shift Arithmetic Block Supports Specification of Bit Shift Values as Input Signal

The Shift Arithmetic block now supports specification of bit shift values from an input port. Previously, you could specify bit shift values only on the dialog box. This enhancement enables you to change bit shift values without stopping a simulation.

The block now also supports the following functionality:

EnhancementBenefit

Specification of diagnostic for out-of-range bit shift values

Flags out-of-range bit shift values during simulation

Option to check for out-of-range bit shift values in the generated code

Enables you to control the efficiency of the generated code

The following parameter changes apply to the Shift Arithmetic block. For backward compatibility, the old command-line parameters continue to work.

Old Prompt on Block Dialog BoxNew Prompt on Block Dialog BoxOld Command-Line ParameterNew Command-Line Parameter
Number of bits to shift rightBits to shift: NumbernBitShiftRightBitShiftNumber
Number of places by which binary point shifts rightBinary points to shift: NumbernBinPtShiftRightBinPtShiftNumber

The read-only BlockType property has also changed from SubSystem to ArithShift.

Multiple Lookup Table Blocks Enable Removal of Range-Checking Code

When the breakpoint input to a Prelookup, 1-D Lookup Table, 2-D Lookup Table, or n-D Lookup Table block falls within the range of valid breakpoint values, you can disable range checking in the generated code. By selecting Remove protection against out-of-range input in generated code on the block dialog box, your code can be more efficient.

Similarly, when the index input to an Interpolation Using Prelookup block falls within the range of valid index values, you can disable range checking in the generated code. By selecting Remove protection against out-of-range index in generated code on the block dialog box, your code can be more efficient.

The Remove protection against out-of-range index in generated code check box replaces the Check index in generated code check box from previous releases. When you load models with the Interpolation Using Prelookup block from previous releases, the following parameter mapping applies:

Parameter Setting from Previous ReleasesParameter Setting for R2011a
Check index in generated code is selected.Remove protection against out-of-range index in generated code is not selected.
Check index in generated code is not selected.Remove protection against out-of-range index in generated code is selected.

For backward compatibility, the command-line parameter CheckIndexInCode continues to work.

Enhanced Dialog Layout for the Prelookup and Interpolation Using Prelookup Blocks

In R2011a, the dialog boxes for the Prelookup and Interpolation Using Prelookup blocks consolidate parameters related to data type attributes on a single tab named Data Types. This enhancement enables you to specify data type attributes more quickly on the block dialog box.

  • For the Prelookup block, you can now specify breakpoint, index, and fraction attributes on a single tab.

  • For the Interpolation Using Prelookup block, you can now specify table, intermediate results, and output attributes on a single tab.

Product of Elements Block Uses a Single Algorithm for Element-Wise Complex Division

In previous releases, the Product of Elements block used two different algorithms for handling element-wise complex division. For example, for a matrix input with four elements (u1, u2, u3, and u4), the following behavior would apply:

  • For inputs with built-in integer and floating-point data types, the order of operations was 1/(u1*u2*u3*u4).

  • For inputs with fixed-point data types, the order of operations was ((((1/u1)/u2)/u3)/u4).

Starting in R2011a, the Product of Elements block uses a single algorithm for handling element-wise complex division. For inputs of integer, floating-point, or fixed-point type, the order of operations is always (((((1/u1)/u2)/u3)/u4)…/uN).

Sign Block Supports Complex Floating-Point Inputs

The Sign block now supports complex inputs of type double or single. The block output matches the MATLAB result for complex floating-point inputs.

When the input u is a complex scalar, the block output is:

sign(u) = u./ abs(u)

When an element of a vector or matrix input is complex, the block uses the same formula that applies to scalar input.

MATLAB Fcn Block Renamed to Interpreted MATLAB Function Block

In R2011a, the MATLAB Fcn block has been renamed to Interpreted MATLAB Function block. The icon has also changed to match the new block name. However, all functionality and block parameters remain the same. The read-only BlockType property is also unchanged.

Existing scripts that use the add_block function to programmatically add the MATLAB Fcn block to models do not require any changes.

When you load existing models that contain the MATLAB Fcn block, the block name that appears in the model remains unchanged. However, the block icon matches the new one for the Interpreted MATLAB Function block.

Environment Controller Block Port Renamed from RTW to Coder

In R2011a, the Environment Controller block has renamed the RTW port to Coder. This enhancement better reflects the purpose of that input port, which designates signals to pass through the block when code generation occurs for a model.

Block Parameters on the State Attributes Tab Renamed

In R2011a, the block parameters Real-Time Workshop storage class and Real-Time Workshop storage type qualifier have been renamed to Code generation storage class and Code generation storage type qualifier, respectively. These two parameters appear on the State Attributes tab of the following block dialog boxes:

  • Discrete Filter

  • Discrete PID Controller

  • Discrete PID Controller (2DOF)

  • Discrete State-Space

  • Discrete Transfer Fcn

  • Discrete Zero-Pole

  • Discrete-Time Integrator

  • Memory

  • Unit Delay

Block Parameters and Values Renamed for Lookup Table Blocks

In R2011a, the Action for out-of-range input parameter has been renamed as Diagnostic for out-of-range input for the following blocks:

Also, the Process out-of-range input parameter has been renamed as Extrapolation method for the Prelookup block.

For lookup table blocks that provide Interpolation method or Extrapolation method parameters, the following changes apply:

Parameter Value from Previous ReleasesParameter Value in R2011a
None - FlatFlat
None - ClipClip

Performance Improvement for Single-Precision Computations of Elementary Math Operations

In R2011a, single-precision computations for elementary math operations are faster. This enhancement applies to the following simulation modes:

  • Normal

  • Accelerator

Dead Zone Block Expands the Region of Zero Output

In R2011a, the Dead Zone block expands the region of zero output, or the dead zone, to include inputs (U) that equal the lower limit (LL) or upper limit (UL):

InputOutput
U >= LL and U <= ULZero
U > ULUUL
U < LLULL

In previous releases, the dead zone excluded inputs that equal the lower or upper limit.

Enhanced PID Controller Blocks Display Compensator Formula in Block Dialog Box

The PID Controller and PID Controller (2 DOF) blocks now display the current compensator formula in the block dialog box. This display reflects the current settings for controller type, controller form, and time domain.

Ground Block Always Has Constant Sample Time

In R2011a, the sample time of the Ground block is now constant (inf) regardless of the setting for Inline parameters in the Configuration Parameters dialog box.

Compatibility Considerations

Previously, if Inline parameters was off, the sample time of the Ground block depended on sample-time propagation. Now, the following conditions hold true:

  • Function-call subsystem blocks that have an unconnected function-call port now have the correct sample time of constant (inf) regardless of the setting for Inline parameters.

  • Function-call subsystem blocks that have a function-call port connected to a Ground block now have the correct sample time of constant (inf) regardless of the setting for Inline parameters.

  • Function-call subsystem blocks that have the Sample time type set to periodic now correctly error out when they are connected to a Ground block or unconnected.

New Function-Call Feedback Latch Block

The Function-Call Feedback Latch block allows you to break a feedback loop involving data signals between function-call signals. You can use this block for two specific scenarios:

  • If a loop involves parent and child function-call blocks (that is, the initiator of the child function-call block is inside the parent function-call block), then place this block on the feedback signal from the child to the parent. You can thus ensure that the value of the signal does not change during execution of the child.

  • If a loop involves function-call blocks connected to branches of the same function-call signal, then this block latches the signal at the input of the destination function-call block, and thereby allows it to execute prior to the source function-call block.

In either case, the latching results in the destination block reading a delayed signal from the previous execution of the source function-call block.

Outport Driving Merge Block Does Not Require IC in Simplified Initializaton Mode

If an Outport block of a conditionally executed subsystem directly drives a Merge block, then the Outport block no longer requires the specification of an Initial Condition (IC) in simplified initialization mode. Simulink still expects the Merge block to specify an IC. This enhancement applies only when the Outport and Merge blocks are in the same model.

Discrete Filter, Discrete FIR Filter, and Discrete Transfer Fcn Blocks Now Have Input Processing Parameter

The Discrete Filter, Discrete FIR Filter, and Discrete Transfer Fcn blocks now have an Input processing parameter. This parameter enables you to specify whether the block performs sample- or frame-based processing on the input. To perform frame-based processing, you must have a DSP System Toolbox™ license.

Model Blocks Can Now Use the GetSet Custom Storage Class

The GetSet custom storage class can now be used for the inports and outports of Model blocks. To assign a GetSet custom storage class to the inport or outport of a referenced model block, use one of the following methods.

  1. Assign the GetSet custom storage class to the root-level inport or outport of the referenced model.

  2. Assign the GetSet custom storage class to scalar signals entering an inport of the referenced model block in the parent model, provided one of the following conditions is met.

    1. The referenced model uses function prototype control to specify that the inport should be passed by value instead of being passed by pointer to the Model block's step function.

    2. The inport to which the GetSet custom storage class is assigned should be passed by value.

  3. Assign the GetSet custom storage class to a scalar signal leaving one of the outports of the referenced model block in the parent model. In this case, the referenced model must use function prototype control to specify that the outport should be the returned value of the function.

User Interface Enhancements

Model Explorer: Hiding the Group Column

By default, the property column that you use for grouping (the group column) appears in the property table. That property also appears in the top row for each group.

To hide the group column, use one of the following approaches:

  • From the View menu, clear the Show Group Column check box.

  • Within the property table, right-click a column heading and clear the Show Group Column check box.

Simulation Data Inspector Enhancements

Multiple Plots in a View

The Simulation Data Inspector tool now supports the configuration of multiple plots into one view. On the Inspect Signals pane, on the View toolbar, select Show Details to display the View Details table.

You can create multiple views by clicking the New view from current button. In each view, you can:

  • Modify the number of plots by clicking the Layout column to display the plot matrix.

  • Name, save, and reload the view using the corresponding buttons.

  • Replace signal data for a run with the corresponding signal data of another run by clicking the Replace runs button.

For more information, see Visual Inspection of Signal Data in the Simulation Data Inspector Tool.

Display Run Properties

In R2011a, you can view the properties of a run. In the Signal Browser table, right-click a run name to view a list of options. To open the Run Properties dialog box, from the options list, select Properties.

New Toolbar Icons

The Simulation Data Inspector toolbar includes a new icon for zooming out a section of a plot. The previous zoom out icon now performs a fit to view operation, which enlarges a plot to fill the graph. To perform either operation, select the icon, and click on a plot.

Model Advisor

In R2011a, the Model Advisor tool now includes easier control of the By Product and By Task folders. In the Model Advisor, select View > Show By Product Folder or Show By Task Folder to show or hide each folder. These settings are persistent across MATLAB sessions.

In the By Task folder, there are two new subfolders:

  • Modeling and Simulation

  • Code Generation Efficiency

For more information on the Model Advisor GUI, see Consulting the Model Advisor.

Configuration Parameters Dialog Box Changes

The Configuration Parameters dialog box layout is improved to better support your workflows. The Optimization pane is reorganized into three panes:

  • General

  • Signals and Parameters

  • Stateflow

These panes make it easier to find parameters.

In R2011a, all tree nodes are collapsed by default. For details, see Configuration Parameters Dialog Box.

S-Functions

S-Functions Generated with legacy_code function and singleCPPMexFile S-Function Option Must Be Regenerated

Due to an infrastructure change, if you have generated an S-function with a call to legacy_code that defines the S-function option singleCPPMexFile, you must regenerate the S-function to use it with this release of Simulink.

Compatibility Considerations

If you have generated an S-function with a call to legacy_code that defines the S-function option singleCPPMexFile, regenerate the S-function to use it with this release of Simulink.

R2010bSP2

Bug Fixes

R2010bSP1

Bug Fixes

R2010b

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Elimination of Regenerating Code for Rebuilds

For models that contain Model Reference blocks and that have not changed between Rapid Acceleration simulations, the rebuild process is more efficient.

Previously, if an Accelerator simulation or a Code Generation ERT/GRT was performed between two Rapid Acceleration simulations, then Simulink partially built the code a second time during the second Rapid Acceleration simulation.

Now, providing the model checksum remains constant, Simulink does not generate code for the second Rapid Accelerator simulation.

Component-Based Modeling

Model Workspace Is Read-Only During Compilation

During the compilation of a model, Simulink enforces that the model workspace is read-only, by issuing an error if there is an attempt to change a model workspace variable during compilation. This enforcement of a read-only workspace prevents the simulation from failing or producing incorrect results due to changes to the model workspace.

Compatibility Considerations

In previous releases, you could change model workspace variables when compiling a model (for example, this could occur when compiling referenced models). Rewrite any code that changes model workspace variables during compilation of a model.

Support for Multiple Normal Mode Instances of a Referenced Model

You can use Normal mode for multiple instances of a referenced model. Prior to R2010b, a model with model references could use Normal mode for at most one instance of each referenced model.

A referenced model must be in Normal mode for you to be able to use several important Simulink and Stateflow features, including linearization and model coverage analysis. Using Normal mode also can make editing and testing models more efficient.

In the sldemo_mdlref_depgraphsldemo_mdlref_depgraph demo, see the "Interacting with the Dependency Viewer in Instance View" section for an example of how to use multiple Normal mode instances of a referenced model. For additional information about using multiple Normal mode instances of a referenced model, see Using Normal Mode for Multiple Instances of Referenced Models.

Compatibility Considerations

The Save As feature preserves the Simulation mode setting of the Model block as much as possible.

If the both of the following conditions are true, then the saved model does not simulate:

  • The R2010b model has multiple Normal mode instances of a referenced model.

  • You use the Save As feature to save the model to a release earlier than R2010b that supports model reference Normal mode.

In this situation, the saved model does not simulate because only one instance of a referenced model could be in Normal mode in that earlier release.

Also, in releases before R2010b, you could select the Refresh Model Blocks menu item directly from the Edit menu in the Model Editor. In R2010b, access the Refresh Model Blocks menu item from the Edit > Model Blocks menu item.

New Variant Subsystem Block for Managing Subsystem Design Alternatives

A Variant Subsystem block provides multiple implementations for a subsystem where only one implementation is active during simulation. You can programmatically swap implementations without modifying the model. When the model is compiled, the Simulink engine chooses the active subsystem from a selection of subsystems. The active subsystem is determined by the values of the variant control variables and variant objects, which you define in the base workspace. By modifying the values of the variant control variables, you can easily specify which subsystem runs in your simulation.

For more information, see Setting Up Variant Subsystems. If you use the Model Advisor to check a system containing a variant subsystem, see Model Advisor Limitations, for more information.

Support for Bus and Enumerated Data Types on Masks

For the Masked Parameters dialog box, you can now create data type parameters that support the specification of bus or enumerated (enum) data types.

To create a data type parameter that supports bus data types, in the Mask Editor, select the Parameters pane.

For information about how to specify bus and enumerated data type parameters, see Data Type Control.

sl_convert_to_model_reference Function Removed

The sl_convert_to_model_reference function is obsolete and has been removed from the Simulink software.

To convert an atomic subsystem to a model reference, right-click the atomic subsystem and select the Convert to Model Block menu item, or use the Simulink.SubSystem.convertToModelReference function. See Atomic Subsystem and Converting a Subsystem to a Referenced Model for more information.

Verbose Accelerator Builds Parameter Applies to Model Reference SIM Target Builds in All Cases

For referenced models, the Configuration Parameter > Optimization > Verbose accelerator build parameter is no longer overridden by the Configuration Parameter > Real-Time Workshop > Debug > Verbose build parameter setting when building model reference SIM targets.

Embedded MATLAB Function Blocks

Specialization of Embedded MATLAB Function Blocks in Simulink Libraries

You can now create library instances of the same Embedded MATLAB Function block with distinct properties, including:

  • Data type, size, complexity, sampling mode, range, and initial value

  • Block sample time

  • Fixed-point data type override mode

  • Resolution to different MATLAB files on the path

With this capability, you can create custom block libraries using Embedded MATLAB Function blocks. For more information, see Creating Custom Block Libraries with MATLAB Function Blocks.

Support for Creation and Processing of Arrays of Buses

The Embedded MATLAB Function block now supports arrays of buses.

Ability to Include MATLAB Code as Comments in Generated C Code

You can now select to include MATLAB source code as comments in code generated for an Embedded MATLAB Function block. This capability improves traceability between generated code and the original source code.

    Note:   This option requires a Real-Time Workshop® license.

For more information, see MATLAB source code as comments in the Real-Time Workshop documentation.

Data Properties Dialog Box Enhancements

In R2010b, the following changes to the Data properties dialog box apply:

ParametersLocation in R2010aLocation in R2010bBenefit of Location Change
Limit range
  • Minimum

  • Maximum

Value Attributes tabGeneral tabConsistent with blocks in the Simulink library that specify these parameters on the same tab as the data type.
Save final value to base workspaceValue Attributes tabDescription tabConsolidates parameters related to the data description.

Parameter Being Removed in Future Release

The Save final value to base workspace will be removed in a future release.

Simulink Data Management

Enhanced Support for Bus Objects as Data Types

The following blocks have added support for specifying a bus object as a data type:

For the Constant block, if you use a bus object as a data type, you can set the Constant value to be one of these values:

  • A full MATLAB structure corresponding to the bus object

  • 0 to indicate a structure corresponding to the ground value of the bus object

See the Constant block reference page for an example that shows how to use a structure to simplify a model.

The following blocks and Simulink classes now use a consistent Data type parameter option, Bus: <object name>, for specifying a bus object as a data type:

Compatibility Considerations

The interface for specifying a bus object as a data type is now consistent for the blocks that support that capability. Making the interface consistent involves removing some block parameters that existed in releases prior to R2010b. The following table summarizes the changes.

BlockRemoved Pre-R2010b ParametersReplacement R2010b Parameter

Bus Creator

Bus object

Specify properties via bus object

Output data type

Inport

Specify properties via bus object

Bus object for validating input bus

Data type

Outport

Specify properties via bus object

Bus object for validating input bus

Data type

Enhancements to Simulink.NumericType Class

The Simulink.NumericType class now has the following methods:

  • isboolean

  • isdouble

  • isfixed

  • isfloat

  • isscalingbinarypoint

  • isscalingslopebias

  • isscalingunspecified

  • issingle

Importing Signal Data Sets into the Signal Builder Block

The Signal Builder block can now accept existing signal data sets. In previous releases, you had to enter existing signal data one by one in the Signal Builder dialog box or with the signalbuilder function.

In the Signal Builder block dialog box, you can now use the File > Import from File to import files that contain data sets. These data sets can contain test data that you have collected, or you can manually create these files. The block accepts the appropriately formatted file types:

  • Excel (.xls, .xlsx)

  • Comma-separated value (CSV) text files (.csv)

  • MAT-files (.mat)

For further information, see Working with Signal Groups in the Simulink User's Guide.

signalbuilder Function Changes

The signalbuilder function has improved functionality:

To...Use...
Add new groups to the Signal Builder block.'append'
Append signals to existing signal groups in the Signal Builder block.'appendsignal'
Make visible signals that are hidden in the Signal Builder block.'showsignal'
Make invisible signals that are visible in the Signal Builder block.'hidesignal'

From File Block Enhancements

The From File block includes the following new features:

  • You can specify the method that the From File block uses to handle situations where there is not an exact match between a Simulink sample time hit and a time in the data file that the From File block reads.

    • In previous releases, the From File block automatically applied a linear interpolation and extrapolation method.

    • In R2010b, you can set the interpolation method independently for each of these situations:

      • Data extrapolation before the first data point

      • Data interpolation within the data time range

      • Data extrapolation after the last data point

    • The choices for the interpolation methods are (as applicable):

      • Linear interpolation

      • Zero-order hold

      • Ground value

  • The From File block now can read signal data that has an enumerated (enum) data type, in addition to previously supported data types.

Finding Variables Used by a Model or Block

You can get a list of variables that a model or block uses.

In the Simulink Editor, right-click a block, subsystem, or the canvas and select the Find Referenced Variables menu item.

Simulink returns the results in the Model Explorer.

As an alternative, you can use the Model Explorer interface directly to find variables used by a model or block, as described in Finding Variables That Are Used by a Model or Block.

enumeration Function Replaced With MATLAB Equivalent

Starting with R2010b, when you invoke the enumeration function, you will be invoking a MATLAB equivalent of the Simulink function with the same name available in earlier releases.

See the description of the new MATLAB enumeration function introduced with new support for enumeration classes.

Programmatic Creation of Enumerations

The new Simulink.defineIntEnumType function provides a way to programmatically import enumerations defined externally—for example, in a data dictionary—to MATLAB. The function creates and saves a enumeration class definition file on the MATLAB path.

For more information, see the description of Simulink.defineIntEnumType and Enumerations and Modeling.

Simulink.Signal and Simulink.Parameter Objects Now Obey Model Data Type Override Settings

Simulink.Signal and Simulink.Parameter objects now honor model-level data type override settings. This capability allows you to share fixed-point models that use Simulink.Signal or Simulink.Parameter objects with users who do not have a Simulink Fixed Point™ license.

To simulate a model without using Simulink Fixed Point, use the Fixed-Point Tool to set the model-level Data type override setting to Double or Single and the Data type override applies to parameter to All numeric types. If you use fi objects or embedded numeric data types in your model, set the fipref DataTypeOverride property to TrueDoubles or TrueSingles and the DataTypeOverrideAppliesTo property to All numeric types to match the model-level settings. For more information, see fxptdlg in the Simulink documentation.

Simulink File Management

Autosave Upgrade Backup

New Autosave option to backup Simulink models when upgrading to a newer release. Automatically saving a backup copy can be useful for recovering the original file in case of accidental overwriting with a newer release.

You can set this Autosave option in the Simulink Preferences Window. See Autosave in the Simulink Graphical User Interface documentation.

Model Dependencies Tools

Enhanced file dependency analysis has the following new features:

  • Find workspace variables that are required by your design but not defined by a file in the manifest

  • Store code analysis warnings in the manifest

  • Validate manifests before exporting to a ZIP file, to check for missing files and data

  • Compare manifests with ZIP files and folders

For details see Model Dependencies.

Simulink Signal Management

Arrays of Buses

You can now use arrays of buses to represent structured data compactly, eliminating the need to include multiple copies of the same buses. You can iteratively process each element of the bus array, for example, by using a For Each subsystem.

The following blocks now support arrays of buses:

Create an array of buses with either a Vector Concatenate or Matrix Concatenate block. The input bus signals to these blocks must be nonvirtual and of the same type (that is, have the same names, hierarchies, and attributes for the leaf elements).

The generated code creates arrays of C structures that represent arrays of buses. You can use the Legacy Code Tool to integrate legacy C code that uses arrays of structures.

In an Embedded MATLAB® Function block, you can process arrays of bus signals using regular MATLAB syntax.

The use of arrays of buses does not support the following:

  • Virtual buses

  • Data loading or logging

  • Stateflow action language

For details about using arrays of buses, see Combining Buses into an Array of Buses.

Compatibility Considerations

If you specify a bus object as the data type for a root Inport or Outport block, the Dimensions parameter is enabled, to allow you to specify dimensions other than 1 or -1 for an array of buses.

In previous releases, the Dimensions parameter was ignored if you specified a bus object as the data type for a root Inport or Outport block. If you specified a dimension other than 1 or -1, then do one of the following, depending on whether you want to use an array of buses or you want to output as a virtual bus:

  • To use an array of buses:

    • In the Signal Attributes pane of the block parameters dialog box for a root Inport or Outport block, select the Output as nonvirtual bus option.

    • In the Configuration Parameters > Diagnostics > Connectivity>> pane, set Mux blocks used to create bus signals to error.

  • To output as a virtual bus, set the Dimensions parameter to 1 or -1.

Loading Bus Data to Root Input Ports

You can now use MATLAB structures and timeseries objects when defining root-level input port signals. Using a structure of timeseries objects for bus signals simplifies loading bus data to root input ports.

To specify the input, use the Configuration Parameters > Data Import/Export > Input parameter. For more information, see Importing MATLAB timeseries Data and Importing Structures of MATLAB timeseries Objects for Bus Signals to a Root-Level Input Port.

Block Enhancements

Prelookup Block Supports Dynamic Breakpoint Data

The Prelookup block now supports specification of breakpoint data from an input port. Previously, you could specify breakpoint data only on the dialog box.

This enhancement enables you to change breakpoint data without stopping a simulation. For example, you can incorporate new breakpoint data if the physical system you are simulating changes.

Interpolation Using Prelookup Block Supports Dynamic Table Data

The Interpolation Using Prelookup block now supports specification of table data from an input port. Previously, you could specify table data only on the dialog box.

This enhancement enables you to change table data without stopping a simulation. For example, you can incorporate new table data if the physical system you are simulating changes.

Multiport Switch Block Supports Specification of Default Case for Out-of-Range Control Input

When the control input of the Multiport Switch block does not match any data port indices, you can specify the last data port as the default or use an additional data port. This enhancement enables you to avoid simulation errors and undefined behavior in the generated code.

Switch Block Icon Shows Criteria and Threshold Values

This enhancement helps you identify the Criteria for passing first input and Threshold values without having to open the Switch block dialog box.

Block IconBlock Dialog Box

Trigonometric Function Block Supports Expanded Input Range for CORDIC Algorithm

The Trigonometric Function block now supports an input range of [–2π, 2π) radians when you set Function to sin, cos, or sincos and set Approximation method to CORDIC. Previously, the input range allowed was [0, 2π) radians.

This enhancement enables you to use a wider range of input values that are natural for problems that involve trigonometric calculations.

Repeating Sequence Stair Block Supports Enumerated Data Types

The Repeating Sequence Stair block now supports enumerated data types. For more information, see Enumerations and Modeling in the Simulink User's Guide.

Abs Block Supports Specification of Minimum Output Value

The Abs block now supports specification of an Output minimum parameter. This enhancement enables you to specify both minimum and maximum values for block output. In previous releases, you could specify the maximum output value but not the minimum, which Simulink assumed to be 0 by default.

Saturation Block Supports Logging of Minimum and Maximum Values for the Fixed-Point Tool

When you set Fixed-point instrumentation mode to Minimums, maximums and overflows in the Fixed-Point Tool, the Saturation block logs minimum and maximum values. In previous releases, this block did not support min/max logging.

Vector Concatenate Block Now Appears in the Commonly Used and Signal Routing Libraries

In the Simulink Library Browser, the Vector Concatenate block now appears in the Commonly Used and Signal Routing libraries. This block continues to appear in the Math Operations library.

Model Discretizer Support for Second-Order Integrator Block

You can now discretize a model containing a Second-Order Integrator block using the Model Discretizer. Based on your block parameter settings, the tool replaces the continuous Second-Order Integrator block with one of the four discrete subsystems in the z-domain.

Integer Delay and Unit Delay Blocks Now Have Input Processing Parameter

The Integer Delay and Unit Delay blocks now have an Input processing parameter. This parameter enables you to specify whether the block performs sample- or frame-based processing on the input. To perform frame-based processing, you must have a Signal Processing Blockset™ license.

Compatibility Considerations

Beginning this release, MathWorks is changing how our products control frame-based processing. Previously, signals themselves were sample or frame based. Our blocks inherited that information from the signal, and processed the input accordingly, either as individual samples or as frames of data. Beginning this release, signals are no longer responsible for carrying information about their frame status. The blocks themselves now control whether they perform sample- or frame-based processing on the input.

Some blocks can do only one type of processing and thus require no changes. Other blocks can do both sample- and frame-based processing and thus require a new parameter. The Integer Delay and Unit Delay blocks fall into the latter category.

If you have any Integer Delay or Unit Delay blocks in an R2010a or earlier model, those blocks will continue to produce the same results in R2010b. When you open an existing model with an Integer Delay or Unit Delay block in R2010b, the Input processing parameter of those blocks will be set to Inherited. Your models will continue to run in this mode, but it is recommended that you run the slupdate function to set the Input processing parameter to the equivalent non-inherited mode. The non-inherited modes are Elements as channels (sample based) and Columns as channels (frame based).

If you do not run the slupdate function on your model before the Inherited option is removed, any Input processing parameter set to Inherited on an Integer Delay or Unit Delay block will be set automatically to Elements as channels (sample based).

Data Store Read Block Sample Time Default Changed to -1

In R2010b, the Data Store Read block uses a default value of -1 for the Sample time, for consistency with the Data Store Write block and most other blocks. In previous releases, the default sample time was 0.

Compatibility Considerations

The Sample time default for the Data Store Read block has changed from 0 in previous releases to -1 in R2010b.

Support of Frame-Based Signals Being Removed From the Bias Block

Starting in R2010b, frame-based signal support is being removed from the Bias block. In a future release, the block will no longer support frame-based processing. To offset a frame-based signal in R2010b or later releases, you can use the Signal Processing Blockset™ Array-Vector Add block.

Compatibility Considerations

If you have any R2010a or earlier models that use the Bias block to offset a frame-based signal, you can use the slupdate function to upgrade your model. For each instance where you use a Bias block with a frame-based input signal, the slupdate function replaces the Bias block with an Array-Vector Add block.

Relaxation of Limitations for Function-Call Split Block

Two limitations of the Function-Call Split block have been relaxed for R2010b.

  • Previously, the direct children of a branched function-call had to have periodic or asynchronous sample time. Now the direct children can also be triggered. Therefore, the branched function-call can trigger a Stateflow chart directly.

  • Previously, if a branched function-call initiator was a Stateflow event, then the Stateflow function-call output event had to be bound to a particular state. Now the event can be bound or unbound to a state when invoking a branched function-call.

User Interface Enhancements

Model Explorer and Command-Line Support for Saving and Loading Configuration Sets

Previously, you could save and load a configuration set from the command line only, requiring many steps. Now you can save and load a configuration set using the Model Explorer. You can also save or load the active configuration set using one function, the Simulink.BlockDiagram.saveActiveConfigSet or Simulink.BlockDiagram.loadActiveConfigSet function.

For details, see the following sections in the Simulink User's Guide:

Model Explorer: Grouping by a Property

In the Contents pane, you can group data based on a property values. For example, you can group by the BlockType property by right-clicking that column heading and selecting the Group by This Column menu item. The result looks similar to this:

For details, see Grouping by a Property.

Model Explorer: Filtering Contents

In the Contents pane, you can specify a text string that the Model Explorer uses to filter the displayed objects. Use the Filter Contents text box at the top of the Contents pane to specify the text for filtering.

For details, see Filtering Contents.

Model Explorer: Finding Variables That Are Used by a Model or Block

In the Model Explorer, you can get a list of variables that a model or block uses. For example, one way to get that list of variables is:

  1. In the Contents pane, right-click the block for which you want to find what variables it uses.

  2. Select the Find Referenced Variables menu item.

You can also use the following approaches to find variables that are used by a model or block:

  • In the Model Explorer, in the Model Hierarchy pane, right-click a model or block and select the Find Referenced Variables menu item.

  • In the Model Explorer, in the search bar, use the for Referenced Variables search type option.

  • In the Model Editor, right-click a block, subsystem, or the canvas and select the Find Referenced Variables option.

Model Explorer: Finding Blocks That Use a Variable

You can use the Model Explorer to get a list of blocks that use a workspace variable. One way to get that list of blocks is to right-click a variable in the Contents pane and select the Find Where Used menu item.

You can also find blocks that use a variable using one of these approaches:

  • In the Search bar, select the for Variable Usage search type option.

  • In the Search Results tab, right-click a variable and select the Find Where Used menu item.

Model Explorer: Exporting and Importing Workspace Variables

You can export workspace variables from the Model Explorer to a MATLAB file or MAT-file.

One way to select the variables to export is by right-clicking the workspace node (for example, Base Workspace) and selecting the Export menu item.

Another way to select variables to export is to:

  1. In the Contents pane, select the variables that you want to export.

  2. Right-click on one of the highlighted variables and select the Export Selected menu item.

Also, you can import variables into a workspace in the Model Explorer:

  1. In the Model Hierarchy pane, right-click the workspace into which you want to import variables.

  2. Select the Import menu item.

Model Explorer: Link to System

The Contents of link at the top left side of the Contents pane links to the currently selected node in the Model Hierarchy pane.

Lookup Table Editor Can Now Propagate Changes in Table Data to Workspace Variables with Nonstandard Data Format

In R2010b, the Lookup Table Editor can propagate changes in table data to workspace variables with nonstandard data format when you:

  • Use sl_customization.m to register a customization function for the Lookup Table Editor.

  • Store this customization function on the MATLAB search path.

For more information, see Lookup Table Editor in the Simulink User's Guide.

Enhanced Designation of Hybrid Sample Time

Because of a new sample time enhancement, a block or signal with a continuous and a fixed in minor step sample time is no longer designated as hybrid. Instead, the block or signal is continuous and colored black. This enhancement assists in identifying hybrid subsystems that require attention.

Inspect Solver Jacobian Pattern

You can now inspect the solver Jacobian pattern in MATLAB and thereby determine if the pattern for your model is sparse. If so, the Sparse Perturbation Method and the Sparse Analytical Method may be able to take advantage of this sparsity pattern to reduce the number of computations necessary and thereby improve performance. For a demonstration that explains how to inspect and assess the sparsity pattern, see Exploring the Solver Jacobian Structure of a ModelExploring the Solver Jacobian Structure of a Model.

Inspection of Values of Elements in Checksum

You can now use Simulink.BlockDiagram.getChecksum to inspect the individual values of the elements making up the ConfigSet checksum.

Conversion of Error and Warning Messages Identifiers

In R2010b, all error and warning message identifiers that Simulink issues have a converted format. As part of this conversion, error and warning identifiers changed from a two-part format to a three-part format. For example, the message identifier 'Simulink:SL_SetParamWriteOnly' is now 'Simulink:Command:SetParamWriteOnly'.

Compatibility Considerations

Scripts that search for specific message identifiers or that turn off warning messages using an identifier must be updated with the new error and warning message identifiers. For an example script and a complete mapping of the new identifiers to the original identifiers, see http://www.mathworks.com/support/solutions/en/data/1-CNY5F6/index.html.

View and Compare Logged Signal Data from Multiple Simulations Using New Simulation Data Inspector Tool

This release introduces the new Simulation Data Inspector tool for quickly viewing and comparing logged signal data. You can use the tool to:

  • View signal data in a graph

  • View a comparison of specified signal data in a graph, including a plot of their differences

  • Store signal data for multiple simulations so that you can specify and compare signal data between multiple simulations

For more information, see Inspecting and Comparing Logged Signal Data and Basic Simulation Workflow.

Viewing Requirements Linked to Model Objects

If your model, or blocks in your model, has links to requirements in external documents, you can now perform the following tasks without a Simulink Verification and Validation™ license:

  • Highlight objects in a model that have links to requirements

  • View information about a requirement

  • Navigate from a model object to associated requirements

  • Filter requirements highlighting based on keywords

S-Functions

Legacy Code Tool Support for Arrays of Simulink.Bus

The Legacy Code Tool now supports arrays of Simulink.Bus objects as valid data types in function specifications. For more information see Supported Data Types under Declaring Legacy Code Tool Function Specifications.

S-Functions Generated with legacy_code function and singleCPPMexFile S-Function Option Must Be Regenerated

Due to an infrastructure change, if you have generated an S-function with a call to legacy_code that defines the S-function option singleCPPMexFile, you must regenerate the S-function to use it with this release of Simulink.

Compatibility Considerations

If you have generated an S-function with a call to legacy_code that defines the S-function option singleCPPMexFile, regenerate the S-function to use it with this release of Simulink.

Level-2 M-File S-Function Block Name Changed to Level-2 MATLAB S-Function

Level-2 MATLAB S-Function is the new name for the Simulink block previously called Level-2 M-File S-Function. In the Function Block Parameters dialog box, S-function name is the new name for the parameter previously called M-file name. The block type M-S-Function remains unchanged.

Compatibility Considerations

If you have a MATLAB script that uses the add_block function with the old block name, you need to update your script with the new name.

Functions Removed

Function Being Removed in a Future Release

This function will be removed in a future release of Simulink software.

Function NameWhat Happens When You Use This Function?Compatibility Considerations
simplotStill works in R2010bUse the Simulation Data Inspector to plot simulation data.

R2010a

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Computation of Sparse and Analytical Jacobian for Implicit Simulink Solvers

The implicit Simulink solvers now support numerical and analytical methods for computing the Jacobian matrix in one of the following representations: sparse perturbation, full perturbation, sparse analytical, and full analytical. The sparse methods attempt to improve performance by taking advantage of sparsity information associated with the Jacobian matrix. Similarly, the analytical methods attempt to improve performance by computing the Jacobian using analytical equations rather than the perturbation equations.

Since the applicability of these representations is highly model dependent, an auto option directs Simulink to use a heuristic to choose an appropriate representation for your model. In the case of a model that has a large number of states and for which the Jacobian is computed in sparse analytical form, the performance improvement may be substantial. In general, the performance improvement achieved varies from model to model.

Sparse Perturbation Support for RSim and Rapid Accelerator Mode

For implicit Simulink solvers, the numerical sparse perturbation method for solving the Jacobian supports both RSim and Rapid Accelerator mode.

Increased Accuracy in Detecting Zero-Crossing Events

The zero-crossing bracketing algorithm now uses a smaller tolerance for defining the interval in which an event occurs. The resulting increased accuracy of locating an event means that existing models may exhibit slightly different numerical results.

Saving Code Generated by Accelerating Models to slprj Folder

In Accelerator mode and in Rapid Accelerator mode, a build has historically resulted in the creation of generated code, respectfully, in the modelname_accel_rtw and the modelname_raccel_rtw folders in the current working folder. However, in order to be more consistent with other builds, in R2010a and future releases, these files will be created in the slprj/accel/modelname and the slprj/raccel/modelname folders.

Component-Based Modeling

Defining Mask Icon Variables

For model efficiency, use the Icon & Ports pane to run MATLAB code and to define variables used by the mask icon drawing commands. In releases earlier than R2010a, you had to use the Initialization pane to define variables used for icon drawing.

Simulink executes the MATLAB code in the Icon & Ports pane only when the block icon needs to be drawn. If you include variables used by mask icon drawing commands in the Initialization pane, Simulink evaluates the variables as part of simulation and code generation.

For more information, see Defining a Mask Icon.

Compatibility Considerations

Starting in R2010a, you can execute any MATLAB function in the Ports & Icons pane of the Mask Editor. If a variable in the mask workspace has the same name as a function in the Ports & Icons pane, Simulink returns an error.

For Each Subsystem Block

The For Each Subsystem block is very useful for modeling scenarios where you need to repeat the same algorithm on individual elements (or submatrices) of an input signal. The set of blocks within the subsystem represent the algorithm that is to be applied to a single element (or submatrix) of the original signal. You can configure the inputs of the subsystem to decompose the corresponding inputs into elements (or submatrices), and configure the outputs to suitably concatenate the processed results. Additionally, each block that has states inside this subsystem maintains separate sets of states for each element or submatrix it processes. Consequently, the operation of this subsystem is akin to copying the contents of the subsystem as many times as the number of elements in the original input signal, and then processing each element through its respective subsystem copy.

An additional benefit of this subsystem is that it may be utilized to improve code reuse in Real-Time Workshop generated code for certain models. Consider a model containing two reusable Atomic Subsystems with the same scalar algorithm applied to each element of the signal. If the input signal dimensions for these subsystems are different, you will find that two distinct functions are produced in the code generated by Real-Time Workshop for this model. Now, if you were to convert the two subsystems to For Each Subsystems such that the contents of each processes a single scalar element, then you will find that the two subsystems produce a single function in the code generated by Real-Time Workshop. This function is parameterized by the number of elements to be processed.

New Function-Call Split Block

A new Function-Call Split block allows you to branch periodic and asynchronous function-call signals and connect them to multiple function-call subsystems (or models). These subsystems (or models) are guaranteed to execute in the order determined by their data dependencies. If a deterministic order cannot be computed, the model produces an error.

To test the validity of your function-call connections, use the Model Advisor diagnostic, Check usage of function-call connections. This diagnostic determines if:

  • Configurations > Diagnostics > Connectivity > Invalid function-call connection is set to error

  • Configuration Parameters > Diagnostics > Connectivity > Context-dependent inputs is set to Enable All

Trigger Port Enhancements

You can use trigger ports, which you define with a Trigger block, in new ways:

  • Place edge-based (rising, falling, or either), as well as function-call, trigger ports at the root level of a model. Before R2010a, to place a trigger port in a root-level model, you had to set the trigger type to function-call.

  • Place triggered ports in models referenced by a Model block. See Triggered Models.

  • Lock down the data type, port dimension, and trigger signal sample time. To specify these values, use the new Signal Attributes pane of the Block Parameters dialog box of the Trigger block. Specifying these attributes is useful for unit testing and running standalone simulation of a subsystem or referenced model that has an edge-based trigger port. See Triggered Models.

Compatibility Considerations

When you add a trigger port to a root-level model, if you use the File > Save As option to specify a release before R2010a, Simulink replaces the trigger port with an empty subsystem.

Model Reference Support for Custom Code

Select the new SupportModelReferenceSimTargetCustomCode model parameter to have SIM target Accelerator code generation include Stateflow and Embedded MATLAB custom code for a referenced model. The default setting for this parameter is off.

Embedded MATLAB Function Blocks

New Ability to Use Global Data

Embedded MATLAB Function blocks are now able to use global data within a Simulink model and across multiple models.

This feature provides these benefits:

  • Allows you to share data between Embedded MATLAB Function blocks and other Simulink blocks without introducing additional input and output wires in your model. This reduces unnecessary clutter and improves the readability of your model.

  • Provides a means of scoping the visibility of data within your model.

For more information, see Using Global Data with the MATLAB Function Block in the Simulink documentation.

Support for Logical Indexing

Embedded MATLAB Function blocks now support logical indexing when variable sizing is enabled. Embedded MATLAB supports variable-size data by default for MEX and C/C++ code generation.

For more information about logical indexing, see Using Logicals in Array Indexing in the MATLAB documentation.

Support for Variable-Size Matrices in Buses

Embedded MATLAB Function blocks now support Simulink buses containing variable-size matrices as inputs and outputs.

Support for Tunable Structure Parameters

Embedded MATLAB Function blocks now support tunable structure parameters. See Working with Structure Parameters in MATLAB Function Blocks.

Check Box for 'Treat as atomic unit' Now Always Selected

In existing models, simulation and code generation for Embedded MATLAB Function blocks always behave as if the Treat as atomic unit check box in the Subsystem Parameters dialog box is selected. Starting in R2010a, this check box is always selected for consistency with existing behavior.

Simulink Data Management

New Function Finds Variables Used by Models and Blocks

The new Simulink.findVars function returns information about workspace variables and their usage. For example, you can use Simulink.findVars, sometimes in conjunction with other Simulink functions, to:

  • Identify all workspace variables used by a model or block

  • Identify any workspace variables unused by a model or block

  • Search a model for all places where a specified variable is referenced

  • Subdivide a model, including only necessary variables with each model

See Simulink.findVars and the other Simulink functions referenced on that page for more information.

MATLAB Structures as Tunable Structure Parameters

You can create a MATLAB structure that groups base workspace variables into a hierarchy, and dereference the structure fields to provide values in Simulink block parameter expressions. This technique reduces base workspace clutter and allows related workspace variables to be conveniently grouped. However, in previous releases you could not use a MATLAB structure as a masked subsystem or a model reference argument, and no value given by a MATLAB structure field could be tuned. These restrictions limited the usefulness of MATLAB structures for grouping variables used in block parameter expressions.

In R2010a, these restrictions no longer apply to MATLAB structures that contain only numeric data. You can use a numeric structure, or any substructure within it, as a masked subsystem or a model reference argument, thereby passing all values in the structure with a single argument. You can also control MATLAB structure tunability using the same techniques that control MATLAB variable tunability. In R2010a, all values in a given structure must be either tunable or nontunable. See Using Structure Parameters for more information.

Simulink.saveVars Documentation Added

The Simulink.saveVars function was added in R2009b but was incompletely documented. See New Function Exports Workspace Variables and Values for more information.

Custom Floating-Point Types No Longer Supported

Custom floating-point types, float(TotalBits, ExpBits), are no longer supported.

Compatibility Considerations

If you have code that uses custom floating-point types, modify this code using one of these methods:

  • Replace calls to float(TotalBits, ExpBits) with calls to fixdt('double') or fixdt('single') as appropriate.

  • Create your own custom float replacement function.

    Write a MATLAB function custom_float_user_replacement and place the file on your MATLAB path. This function must take TotalBits and ExpBits as input arguments and return a supported numerictype object, such as fixdt('double') or fixdt('single').

    For example,

    function DataType = custom_float_user_replacement(TotalBits,ExpBits)
        
    if (TotalBits <= 32) && (ExpBits <= 8)
        DataType = numerictype('single');
    else
        DataType = numerictype('double');
    end

    In R2010a and future releases, if the file custom_float_user_replacement.m is on your MATLAB path, calls to float(TotalBits, ExpBits) automatically call custom_float_user_replacement(TotalBits, ExpBits).

Data Store Logging

You can log the values of a local or global data store data variable for all the steps in a simulation. Data store logging is useful for:

  • Model debugging – view the order of all data store writes

  • Confirming a model modification – use the logged data to establish a baseline for comparing results to identify the impact of a model modification

To log a local data store that you create with a Data Store Memory block:

  • Use the new Logging pane of the Block Parameters dialog box for the Data Store Memory block.

  • Enable data store logging with the new Configuration Parameters > Data Import/Export > Data stores parameter.

To log a data store defined by a Simulink.Signal object, from the MATLAB command line, set DataLogging (which is a property of the LoggingInfo property of Simulink.Signal) to 1.

For details, see Logging Data Stores. To see an example of logging a global data store, run the sldemo_mdlref_dsmsldemo_mdlref_dsm demo.

Models with No States Now Return Empty Variables

Simulink creates empty variables for state logging (xout) or final state logging (xfinal), if both of these conditions apply:

  • A model has no states.

  • In the Configuration Parameters > Data Import/Export pane, you enable the States, Final States, or both parameters (the default is off).

Compatibility Considerations

If you configure your model to return empty variables when it has no states, then a possible result is that Simulink creates more variables than it did in previous releases.

Using model variants, running different models in batch mode, tuning models, or reconfiguring models can produce unexpected results based on the state values. For example, if you simulate a model that produces a state value, and then run a model variant that produces no state, Simulink overwrites the state value with an empty variable. If your model depends on the first state value not being overwritten if no state is returned in a subsequent simulation (which was the case in previous releases), then you get unexpected results.

To File Block Enhancements

The To File block now supports:

  • Saving very large data sets that may be too large to fit in RAM

  • Saving logged data up until the point of a premature ending of simulation processing. Previously, if the simulation processing did not complete, then To File did not store any logged data for that simulation.

  • A new Save format parameter to control whether the block uses Timeseries or array format for data.

    • Use Timeseries format for writing multidimensional, real, or complex inputs, with different data types, (for example, built-in data types, including Boolean; enumerated (enum) data and fixed-point data with a word length of up to 32 bits.

    • Use Array format only for one-dimensional, double, noncomplex inputs. Time values are saved in the first row. Additional rows correspond to input elements.

Compatibility Considerations

For data saved using MAT file versions prior to 7.3, the From File block can only load two-dimensional arrays consisting of one-dimensional, double, noncomplex samples. To load data of any other type, complexity, or dimension, use a Timeseries object and save the file using MAT file version 7.3 or later. For example, use 'save file_name -v7.3 timeseries_object':

save file_name -v7.3 timeseries_object

From File Block Enhancements

The From File block now supports:

  • Incremental loading of very large data sets that may be too large to fit in RAM

  • Built-in data types, including Boolean

  • Fixed-point data with a word length of up to 32 bits

  • Complex data

  • Multidimensional data

Root Inport Support for Fixed-Point Data Contained in a Structure

You can now use a root (top-level) Inport block to supply fixed-point data that is contained in a structure.

In releases before R2010a, you had to use a Simulink.Timeseries object instead of a structure.

Simulink Signal Management

Enhanced Support for Proper Use of Bus Signals

To improve model reliability and robustness, avoid mixing Mux blocks and bus signals. To help you use Mux blocks and bus signals properly, R2010a adds these enhancements:

  • When Simulink detects Mux block and bus signal mixtures, the Mux blocks used to create bus signals diagnostic now generates:

    • A warning when all the following conditions apply:

      • You load a model created in a release before R2010a.

      • The diagnostic is set to 'None'.

      • Simulink detects improper Mux block usage.

    • An error for new models

  • Two new diagnostics in the Configuration Parameters > Diagnostics > Connectivity pane:

    • The Non-bus signals treated as bus signals diagnostic detects when Simulink implicitly converts a non-bus signal to a bus signal to support connecting the signal to a Bus Assignment or Bus Selector block.

    • The Repair bus selections diagnostic repairs broken selections in the Bus Selector and Bus Assignment block parameters dialog boxes that are due to upstream bus hierarchy changes.

Compatibility Considerations

In R2010a, if you load a model created in a prior release, you might get warning messages that you did not get before. To avoid getting Mux block-related warnings for existing models that you want to load in R2010a, use the slreplace_mux function to substitute Bus Creator blocks for any Mux blocks used to create buses signals.

Bus Initialization

In releases before R2010a:

  • For virtual buses, you could specify a non-zero scalar or vector initial condition (IC) value that applies to all elements of the bus. You could use a vector value only if all bus elements use the same data type.

  • For nonvirtual buses, the only value you could specify was zero.

In R2010a, you can create a MATLAB structure for an IC. You can:

  • Specify ICs for all or a subset of the bus elements.

  • Use the new Simulink.Bus.createMATLABStruct helper method to create a full IC structure.

  • Use the new Model Advisor Simulink check, Check for partial structure parameter usage with bus signals, to detect when structure parameters are not consistent in shape with the associated bus signal.

Using IC structures helps you to:

  • Specify nonzero initial conditions

  • Specify initial conditions for mixed-dimension signals

  • Apply a different IC for each signal in the bus

  • Specify ICs for a subset of signals in a bus without specifying ICs for all the signals

  • Use the same ICs for multiple blocks, signals, or models

For information about creating and using initial condition structures, see Specifying Initial Conditions for Bus Signals.

S-Functions for Working with Buses

The following S-functions provide a programmatic interface for working with buses:

S-function

Description

ssGetBusElementComplexSignal

Get the signal complexity for a bus element.

ssGetBusElementDataType

Get the data type identifier for a bus element.

ssGetBusElementDimensions

Get the dimensions of a bus element.

ssGetBusElementName

Get the name of a bus element.

ssGetBusElementNumDimensions

Get the number of dimensions for a bus element.

ssGetBusElementOffset

Get the offset from the start of the bus data type to a bus element.

ssGetNumBusElements

Get the number of elements in a bus signal.

ssGetSFcnParamName

Get the value of a block parameter for an S-function block.

ssIsDataTypeABus

Determine whether a data type identifier represents a bus signal.

ssRegisterTypeFromParameter

Register a data type that a parameter in the Simulink data type table specifies.

ssSetBusInputAsStruct

Specify whether to convert the input bus signal for an S-function from virtual to nonvirtual.

ssSetBusOutputAsStruct

Specify whether the output bus signal from an S-function must be virtual or nonvirtual.

ssSetBusOutputObjectName

Specify the name of the bus object that defines the structure and type of the output bus signal.

Command Line API for Accessing Information About Bus Signals

You can use two new signal property parameters to get information about the type and hierarchy of a signal programmatically:

  • CompiledBusType

    • Returns information about whether the signal connected to a port is a bus, and if so, whether it is a virtual or nonvirtual bus

  • SignalHierarchy

    • Returns the signal name of the signal. If the signal is a bus, the parameter also returns the hierarchy and names of the bus signal.

Signal Name Propagation for Bus Selector Block

The new SignalNameFromLabel port parameter supports signal name propagation for Bus Creator block input signals whenever you change the name of an input signal programmatically. You can set this parameter with the set_param command, specifying either a port or line handle and the signal name to propagate.

Block Enhancements

New Square Root Block

You can use the new Sqrt block to perform square-root calculations. This block includes the following functions:

FunctionIcon
sqrt

signedSqrt

rSqrt

Compatibility Considerations

The sqrt and 1/sqrt functions no longer appear in the Math Function block. For backward compatibility, models with a Math Function block that uses one of these two functions continue to work. However, consider running the slupdate function on your model. slupdate replaces any Math Function block that uses sqrt or 1/sqrt with an equivalent Sqrt block that ensures the same behavior.

New Second-Order Integrator Block

You can use the new Second-Order Integrator block to model second-order systems that have bounds on their states. This block is useful for modeling physical systems, for example, systems that use Newton's Second Law and have constraints on their motion.

Benefits of using this block include:

  • Highly accurate results

  • Efficient detection of zero crossings

  • Prevention of direct feedthrough and algebraic loops

New Find Nonzero Elements Block

You can use the new Find block to locate all nonzero elements of an input signal. This block outputs the indices of nonzero elements in linear indexing or subscript form and provides these benefits:

When you use the block to...You can...

Convert logical indexing to linear indexing

Use the linear indices you get from processing a logical indexing signal as the input to a Selector or Assignment block

Extract subscripts of nonzero values

Use the subscript of matrices for 2-D or higher-dimensional signal arrays to aid with image processing

Represent sparse signals

Use indices and values as a compact representation of sparse signals

PauseFcn and ContinueFcn Callback Support for Blocks and Block Diagrams

The new PauseFcn and ContinueFcn callbacks detect clicking of the Pause and Continue buttons during simulation. You can set these callbacks using the set_param command or the Callbacks tab of the Model Properties dialog box. Both the PauseFcn and ContinueFcn callbacks support Normal and Accelerator simulation modes.

Gain Block Can Inherit Parameter Data Type from Gain Value

The Gain block now supports the Parameter data type setting of Inherit: Inherit from 'Gain'. This enhancement provides the benefit of inheriting the parameter data type directly from the Gain parameter. For example:

If you set Gain to...The parameter data type inherits...
2double
single(2)single
int8(2)int8

Direct Lookup Table (n-D) Block Enhancements

The Direct Lookup Table (n-D) block now supports:

  • Multidimensional signals for the table input port

  • Fixed-point data types for the table input port

  • Explicit specification of the table data type in the block dialog box

Multiport Switch Block Allows Explicit Specification of Data Port Indices

The icon for the Multiport Switch block now shows the values of indices on data port labels. This enhancement helps you identify the data inputs without having to open the block dialog box:

Block Parameter SettingsBlock Icon

When you load existing models that contain the Multiport Switch block, the following parameter mapping occurs:

Block Parameter Settings of a Model from R2009b or EarlierBlock Parameter Settings When You Load the Model in R2010a

The following command-line parameter mapping applies:

Old Prompt on Block Dialog BoxNew Prompt on Block Dialog BoxOld Command-Line ParameterNew Command-Line Parameter
Number of inputsNumber of data portsInputsSame
Use zero-based indexingData port orderzeroidxDataPortOrder

The parameter mapping in R2010a ensures that you get the same block behavior as in previous releases.

Compatibility Considerations

In R2010a, a warning appears at compile time when your model contains a Multiport Switch block with the following configuration:

  • The control port uses an enumerated data type.

  • The data port order is contiguous.

During edit time, the block icon cannot show the mapping of each data port to an enumerated value. This configuration can also lead to unused ports during simulation and unused code during Real-Time Workshop® code generation.

Run the slupdate function on your model to replace each Multiport Switch block of this configuration with a block that explicitly specifies data port indices. Otherwise, your model might not work in a future release.

In R2010a, the following Multiport Switch block configuration also produces a warning at compile time:

  • The control port uses a fixed-point or built-in data type.

  • The data port order is contiguous.

  • At least one of the contiguous data port indices is not representable with the data type of the control port.

The warning alerts you to unused ports during simulation and unused code during Real-Time Workshop code generation.

Trigonometric Function Block Supports CORDIC Algorithm and Fixed-Point Data Types

When you select sin, cos, or sincos for the Trigonometric Function block, additional parameters are available.

New Block ParameterPurposeBenefit
Approximation method

Specify the type of approximation the block uses to compute output: None or CORDIC.

Enables you to use a faster method of computing block output for fixed-point and HDL applications.

Number of iterations

For the CORDIC algorithm, specify how many iterations to use for computing block output.

Enables you to adjust the precision of your block output.

This block now supports fixed-point data types when you select sin, cos, or sincos and set Approximation method to CORDIC.

Lookup Table Dynamic Block Supports Direct Selection of Built-In Data Types for Outputs

In R2010a, you can select the following data types directly for the Output data type parameter of the Lookup Table Dynamic block:

  • double

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean

Previously, you had to enter an expression for Output data type to specify a built-in data type.

Compare To Zero and Wrap To Zero Blocks Now Support Parameter Overflow Diagnostic

If the input data type to a Compare To Zero or Wrap To Zero block cannot represent zero, detection of this parameter overflow occurs. In the Diagnostics > Data Validity pane of the Configuration Parameters dialog box, set Parameters > Detect overflow to warning or error.

Data Type Duplicate Block Enhancement

The Data Type Duplicate block is now a built-in block. Previously, this block was a masked S-Function. The read-only BlockType parameter has changed from S-Function to DataTypeDuplicate.

Compatibility Considerations

In R2010a, signal propagation might behave differently from previous releases. As a result, your model might not compile under these conditions:

  • Your model contains a Data Type Duplicate block in a source loop.

  • Your model has underspecified signal data types.

If your model does not compile, set data types for signals that are not fully specified.

Lookup Table and Lookup Table (2-D) Blocks To Be Deprecated in a Future Release

In a future release, the Lookup Table and Lookup Table (2-D) blocks will no longer appear in the Simulink Library Browser. Consider replacing instances of those two blocks by using 1-D and 2-D versions of the Lookup Table (n-D) block. Among other enhancements, the Lookup Table (n-D) block supports the following features that the other two blocks do not:

  • Specification of parameter data types different from input or output signal types

  • Reduced memory use and faster code execution for evenly spaced breakpoints that are nontunable

  • Fixed-point data types with word lengths up to 128 bits

  • Specification of index search method

  • Specification of action for out-of-range inputs

To upgrade your model:

StepDescriptionReason
1

Run the Simulink Model Advisor check for Check model, local libraries, and referenced models for known upgrade issues.

Identify blocks that do not have compatible settings with the Lookup Table (n-D) block.

2

For each block that does not have compatible settings with the Lookup Table (n-D) block:

  • Decide how to address each warning.

  • Adjust block parameters as needed.

Modify each Lookup Table or Lookup Table (2-D) block to make them compatible.

3

Repeat steps 1 and 2 until you are satisfied with the results of the Model Advisor check.

Ensure that block replacement works for the entire model.

4

Run the slupdate function on your model.

Perform block replacement with the Lookup Table (n-D) block.

Compatibility Considerations

The Model Advisor check groups all Lookup Table and Lookup Table (2-D) blocks into three categories:

  • Blocks that have compatible settings with the Lookup Table (n-D) block

  • Blocks that have incompatible settings with the Lookup Table (n-D) block

  • Blocks that have repeated breakpoints

Blocks with Compatible Settings

When a block has compatible parameter settings with the Lookup Table (n-D) block, automatic block replacement can occur without backward incompatibilities.

Lookup Method in the Lookup Table or Lookup Table (2-D) BlockParameter Settings in the Lookup Table (n-D) Block After Block Replacement
InterpolationExtrapolation
Interpolation-ExtrapolationLinearLinear
Interpolation-Use End ValuesLinearNone-Clip
Use Input BelowNone-FlatNot applicable

Depending on breakpoint characteristics, the Lookup Table (n-D) block uses one of two index search methods.

Breakpoint Characteristics in the Lookup Table or Lookup Table (2-D) BlockIndex Search Method in the Lookup Table (n-D) Block After Block Replacement
Not evenly spacedBinary search
Evenly spaced and tunableA prompt appears, asking you to select Binary search or Evenly spaced points.
Evenly spaced and nontunable

The Lookup Table (n-D) block also adopts other parameter settings from the Lookup Table or Lookup Table (2-D) block. For parameters that exist only in the Lookup Table (n-D) block, the following default settings apply after block replacement:

Lookup Table (n-D) Block ParameterDefault Setting After Block Replacement
Breakpoint data typeInherit: Same as corresponding input
Action for out-of-range inputNone

Blocks with Incompatible Settings

When a block has incompatible parameter settings with the Lookup Table (n-D) block, the Model Advisor shows a warning and a recommended action, if applicable.

  • If you perform the recommended action, you can avoid incompatibility during block replacement.

  • If you use automatic block replacement without performing the recommended action, you might see numerical differences in your results.

Incompatibility WarningRecommended ActionWhat Happens for Automatic Block Replacement

The Lookup Method is Use Input Nearest or Use Input Above. The Lookup Table (n-D) block does not support these lookup methods.

Change the lookup method to one of the following:

  • Interpolation - Extrapolation

  • Interpolation - Use End Values

  • Use Input Below

The Lookup Method changes to Interpolation - Use End Values.

In the Lookup Table (n-D) block, this setting corresponds to:

  • Interpolation set to Linear

  • Extrapolation set to None-Clip

You also see a message that explains possible numerical differences.

The Lookup Method is Interpolation - Extrapolation, but the input and output are not the same floating-point type. The Lookup Table (n-D) block supports linear extrapolation only when all inputs and outputs are the same floating-point type.

Change the extrapolation method or the port data types of the block.

The block uses small fixed-point word lengths, so that interpolation uses only one rounding operation. The Lookup Table (n-D) block uses two rounding operations for interpolation.

None

You see a message that explains possible numerical differences.

Blocks with Repeated Breakpoints

When a block has repeated breakpoints, the Model Advisor recommends that you change the breakpoint data and rerun the check. You cannot perform automatic block replacement for blocks with repeated breakpoints.

Elementary Math Block Now Obsolete

The Elementary Math block is now obsolete. You can replace any instance of this obsolete block in your model by using one of these blocks in the Math Operations library:

Compatibility Considerations

If you open a model that contains an Elementary Math block, a warning message appears. This message suggests running slupdate on your model to replace each instance of the obsolete block with an appropriate substitute.

If you try to start simulation or generate code for a model that contains this obsolete block, an error message appears.

DocBlock Block RTF File Compression

In R2010a, when you add or modify a DocBlock block that uses Microsoft® RTF format and you save the model, Simulink compresses the RTF file. The saved RTF files with images are much smaller than in previous releases.

Compatibility Considerations

In R2010a, if you use slupdate or save a model that includes a DocBlock block that uses RTF format, you cannot run the model in an earlier version of Simulink.

To run a model that has a compressed RTF file in an earlier version of Simulink, use Save As to save the model in the format of the earlier release.

Simulink Extras PID Controller Blocks Deprecated

In R2010a, the PID Controller (with Approximate Derivative) and PID Controller blocks of the Simulink Extras library no longer appear in the Simulink Library Browser. For models created using R2009b or earlier, consider using the slupdate function to replace these blocks with the new PID Controller block of the Simulink/Continuous or Simulink/Discrete library. Among other enhancements, the new PID Controller block supports:

  • Continuous-time and discrete-time modeling

  • Ideal and Parallel controller forms

  • Automatic PID tuning (requires a Simulink Control Design™ license)

For more information, see the PID Controller and PID Controller (2 DOF) block reference pages.

Compatibility Considerations

For backward compatibility, simulation and code generation of models that contain the deprecated PID Controller (with Approximate Derivative) or PID Controller block continue to work.

User Interface Enhancements

Model Explorer Column Views

The Model Explorer now supports column views, which specify sets of property columns to display in the Contents pane. The Model Explorer displays only the properties that are defined for the current column view. The Model Explorer does not add new properties dynamically as you add objects to the Contents pane. Using a defined subset of properties to display streamlines the task of exploring and editing model object properties and increases the density of the data displayed.

Model Explorer provides several standard column views with common property sets. You can:

  • Select the column view based on the task you are performing

  • Customize the standard column views

  • Create your own column views

  • Export and import column views saved in MAT-files, which you can share with other users

Compatibility Considerations

Column views replace the Customize Contents option provided in previous releases.

In R2010a, the Model Explorer provides a different interface for performing some of the tasks that you previously performed using View menu items. The following table summarizes differences between R2009b and R2010a.

R2009b View Menu ItemR2010a Model Explorer Interface Change
Dialog View Replaced by Show Dialog Pane
Customize ContentsReplaced by Column View > Show Details
Show PropertiesEliminated; select Column View > Show Details to specify properties to display
Mark Nonexistent PropertiesReplaced by Show Nonexistent Properties as'-'
Library BrowserEliminated (you can access the Library Browser from the Simulink Editor View menu)
List View OptionsReplaced by Row Filter

Model Explorer Display of Masked Subsystems and Linked Library Subsystems

The Model Explorer now contains global options for specifying whether the Model Explorer displays the contents of library links and masked subsystems. These options also control whether the Model Hierarchy pane displays linked or masked subsystems. See Displaying Masked Subsystems and Displaying Linked Library Subsystems.

Compatibility Considerations

In R2010a, when you select a masked subsystem node in the Model Hierarchy pane, the Contents pane displays the objects of the subsystem, reflecting the global setting to display masked subsystems. In prior releases, if you selected a masked subsystem node, you needed to right-click the node and select Look Under Mask to view the subsystem objects in the Contents pane.

In R2010a, the search results reflect the Show Library Links and Show Masked Subsystems settings. In previous releases, you specified the Look Inside Masked Subsystems and Look Inside Linked Subsystems options as part of the search options. R2010a does not include those search options.

Model Explorer Object Count

The top-right section of the Contents pane displays a count of objects found for the currently selected nodes in the Model Hierarchy pane. The count indicates the number of objects displayed in the Contents pane, compared to the total number of objects in the currently selected nodes. The number of displayed objects is less than the total number of objects in scope when you filter some objects by using View > Row Filter options. See Object Count.

Model Explorer Search Option for Variable Usage

You can use the new for Variable Usage search type to search for blocks that use a variable that is defined in the base or model workspaces. See Search Bar Controls.

Model Explorer Display of Signal Logging and Storage Class Properties

The Model Explorer Contents pane displays the following additional properties for signal lines:

  • Signal logging-related properties (such as DataLogging)

  • Storage class properties, including properties associated with custom storage classes for signals

Displaying these properties in the Contents pane enables batch editing. Prior to R2010a, you could edit these properties only in the Signal Properties dialog box.

Model Explorer Column Insertion Options

In R2010a, right-clicking on a column heading in the Contents pane provides two new column insertion options:

  • Insert Path – adds the Path property column to the right of the selected column.

  • Insert Recently Hidden Columns – selects a property from a list of columns you recently hid, to add that property column to the right of the selected column

Diagnostics for Data Store Memory Blocks

The Model Advisor 'By Task' folder now contains a Data Store Memory Blocks subfolder. This subfolder contains checks relating to Data Store Memory blocks that examine your model for:

  • Multitasking, strong typing, and shadowing issues

  • An enabled status of the read/write diagnostics

  • Read/write issues

New Command-Line Option for RSim Targets

A new –h command-line option allows you to print a summary of the available options for RSim executable targets.

Simulink.SimulationOutput.get Method for Obtaining Simulation Results

The Simulink.SimulationOutput class now has a get method. After simulating your model, you can use this method to access simulation results from the Simulink.SimulationOutput object.

Simulink.SimState.ModelSimState Class has New snapshotTime Property

The Simulink.SimState.ModelSimState class has a new snapshotTime property. You can use this property to access the exact time at which Simulink took a "snapshot" of the simulation state (SimState) of your model.

Simulink.ConfigSet.saveAs to Save Configuration Sets

The saveAs method is added to the Simulink.ConfigSet class to allow you to easily save the settings of configuration sets as MATLAB functions or scripts. Using the MATLAB function or script, you can share and archive model configuration sets. You can also compare the settings in different configuration sets by comparing the MATLAB functions or scripts of the configuration sets.

For details, see Save a Configuration Set in the Simulink User's Guide.

S-Functions

Building C MEX-Files from Ada and an Example Ada Wrapper

In an R2008b release note, MathWorks announced that support for Ada S-functions in Simulink would be removed in a future release and a migration strategy would be forthcoming.

In this release, the addition of Technical Note 1821 facilitates your incorporating Ada code into Simulink without using Ada S-function support. This note, "Developing and Building Ada S-Functions for Simulink", is available at Technical Note 1821 and demonstrates:

  • How to build a C MEX S-function from Ada code without using the mex –ada command

  • An example of an Ada wrapper around a C MEX S-Function API

New S-Function API Checks for Branched Function-Calls

A new S-function API, ssGetCallSystemNumFcnCallDestinations, allows you to determine the number of function-call blocks that your S-function calls. Based on this returned number, you can then deduce whether or not your S-function calls a branched function-call.

You can call this SimStruct function from mdlSetWorkWidths or later in your S-function.

New C MEX S-Function API and M-File S-Function Flag for Compliance with For Each Subsystem

To allow a C MEX S-function to reside inside of a For Each Subsystem block, you must call the new ssSupportsMultipleExecInstances API and set the flag to true in the mdlSetWorkWidths method.

As for M-file S-functions, you must set the new flag block.SupportsMultipleExecInstances to true in the Setup section.

Legacy Code Tool Enhanced to Support Enumerated Data Types and Structured Tunable Parameters

The Legacy Code Tool has been enhanced to support

  • Enumerated data types for input, output, parameters, and work vectors

  • Structured tunable parameters

For more information about data types that the Legacy Code Tool supports, see Supported Data Types. For more information about the Legacy Code Tool, see

Compatibility Considerations

For enumerated data type support:

  • If you upgrade from R2008b or later release, you can continue to compile the S-function source code and continue to use the compiled output from an earlier release without recompiling the code.

  • If you upgrade from R2008a or earlier release, you cannot use enumerated types; the Simulink engine will display an error during simulation.

You cannot use tunable structured parameters with Legacy Code Tool in a release prior to R2010a.

Documentation Improvements

Modeling Guidelines for High-Integrity Systems

MathWorks intends the Modeling Guidelines for High-Integrity Systems document to be for engineers developing models and generating code for high-integrity systems using Model-Based Design with MathWorks® products. This document describes creating Simulink models that are complete, unambiguous, statistically deterministic, robust, and verifiable. The document focus is on model settings, block usage, and block parameters that impact simulation behavior or code generated by the Real-Time Workshop Embedded Coder™ product.

These guidelines do not assume that you use a particular safety or certification standard. The guidelines reference some safety standards where applicable, including DO-178B, IEC 61508, and MISRA C.

You can use the Model Advisor to support adhering to these guidelines. Each guideline lists the checks that are applicable to that guideline.

For more information, see Modeling Guidelines for High-Integrity Systems in the Simulink documentation.

MathWorks Automotive Advisory Board Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow Included in Help

MathWorks Automotive Advisory Board (MAAB) involves major automotive original equipment manufacturers (OEMs) and suppliers in the process of evolving MathWorks controls, simulation, and code generation products, including the Simulink, Stateflow, and Real-Time Workshop products. An important result of the MAAB has been the "MathWorks Automotive Advisory Board Control Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow." Help for the Simulink product now includes these guidelines. The MAAB guidelines link to relevant Model Advisor MAAB check help and MAAB check help links to relevant MAAB guidelines.

R2009bSP1

Bug Fixes

R2009b

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Single-Output sim Syntax

An enhanced sim command provides for greater ease of use and for greater compatibility with parfor loops. Since the command now saves all simulation results to a single object, the management of output variables is straightforward for all cases, including parallel computing.

Expanded Support by Rapid Accelerator

Simulink Rapid Accelerator mode now supports root inputs of enumerated data type and fixed-point parameters of any word length.

SimState Support in Accelerator Mode

Simulink Accelerator mode now supports the SimState feature. You can therefore save the simulation state and later resume the simulation from the exact save time.

Integer Arithmetic Applied to Sample Hit Computations

For fixed-step simulations, Simulink now computes sample time hits using integer arithmetic. This modification improves the timing resolution of sample hits of multirate models.

Compatibility Considerations

Previously, if an S-function had two rates, and if (ssIsSampleHit(S, idx1) == true && ssIsSampleHit(S,idx2) == true, then Simulink would adjust the task times to be evaluated as ssGetTaskTime(S, idx1) == ssGetTaskTime(S, idx2). Simulink no longer forces this equality; instead, Simulink now leaves the individual task times to be integer multiples of their corresponding periods. Consequently, existing code with logic that relies upon the equality of the task times needs to be updated.

In addition, the behavior of the command get_param(model, 'SimulationTime') is now different. Instead of returning the time of the next known sample hit at the bottom of the current step, this command now returns the current time.

Improved Accuracy of Variable-Step Discrete Solver

For variable-step discrete simulation of purely discrete models, where the fundamental step size is the same as the fastest discrete rate, Simulink now uses the specified start and stop times.

Compatibility Considerations

Previously, if the fundamental step size was equal to the fastest discrete rate, the Simulink simulation did not uniformly honor the user-specified start and stop times. Specifically, if the start and stop times were not exact multiples of the fundamental step size, then the start time was adjusted to the time of the first sample time hit and the simulation stopped at the sample time hit just before the specified stop time. However, if the simulation was required to hit certain time points (either by specifying TSPAN in the sim command such as 'sim('Model_A',[0 10])', or via the OutputTimes parameter), then the start and stop times were not adjusted

Now Simulink variable-step simulation of purely discrete models consistently honors the user-specified start and stop times, irrespective of whether the fastest discrete sample time is the GCD of all of the other sample times

Component-Based Modeling

Enhanced Library Link Management

In R2009b, improved library link management (Links Tool) facilitates visualizing and restoring edited library links. See Working with Library Links for more information.

Enhanced Mask Editor Provides Tabs and Signal Attributes

You can use the R2009b Mask Editor to create a mask that has tabbed panes, and define the same signal attribute specifications in a mask that built-in Simulink blocks provide. See Working with Block Masks , Simulink Mask Editor and Mask Icon Drawing Commands for more information.

Model Reference Variants

Model reference variants allow you to configure any Model block to select its referenced model from a set of candidate models. The selection occurs when you compile the model that contains the Model block, and depends on the values of one or more MATLAB variables or Simulink parameters in the base workspace. To configure a Model block to select the model that it references, you:

  • Provide a set of Boolean expressions that reference base workspace values.

  • Associate each expression with one of the models that the block could reference.

When you compile the model, Simulink evaluates all the expressions. Each Model block that uses model reference variants then selects the candidate model whose associated expression is true, and ignores all the other models. Compilation then proceeds exactly as if you had entered the name of the selected model literally in the Model block's Model name field.

You can nest Model blocks that use variants to any level, allowing you to define any number of arbitrarily complex customized models within a single framework. No matter how many simulation environments you define, selecting one requires only setting variable or parameter values appropriately in the base workspace. See Setting Up Model Variants for more information.

Protected Referenced Models

A protected model is a referenced model from which all block and line information has been eliminated. Protecting a model does not use encryption technology. A protected model can be distributed without revealing the intellectual property that it embodies. The model is said to run in Protected mode, and gives the same results that its source model does when run in Accelerator mode.

You can use a protected model much as you could any referenced model that executes in Accelerator mode. Simulink tools work with protected models to the extent possible given that the model's contents are obscured. For example, the Model Explorer and the Model Dependency Viewer show the hierarchy under an ordinary referenced model, but not under a protected model. Signals in a protected model cannot be logged, because the log could reveal information about the protected model's contents.

When a referenced model requires object definitions or tunable parameters that are defined in the MATLAB base workspace, the protected version of the model may need some or all of those same definitions when it executes as part of a third-party model. Simulink provides techniques for identifying and obtaining the needed data. You can use the Simulink Manifest Tools or other techniques to package the model and any data for delivery.

Protecting a model requires a Real-Time Workshop license, which makes code generation capabilities available for use internally when creating the protected version of the model. The receiver of a protected model does not need a Real-Time Workshop license to use the model, and cannot use Real-Time Workshop to generate code for the model or any model that references it.

To accommodate protected models, the Model block now accepts a suffix in the Model name field. This suffix can be .mdl for an unprotected model or .mdlp for a protected model. If the suffix is omitted, Model block first searches the MATLAB path for a block with the specified name and the suffix .mdl. If that search fails, the block searches the path for a model with the suffix .mdlp.

The Model block now has a field named ProtectedModel, a boolean that indicates whether the referenced model is protected, and three fields for representing the name of the referenced model in different formats: ModelNameDialog, ModelName, and ModelFile. See the Model block parameters in Ports & Subsystems Library Block Parameters for information about these parameters. For more information about protecting models, see Protecting Referenced Models.

Simulink Manifest Tools

Enhanced Simulink Manifest Tools now discover and analyze model variants, protected models, and Simscape files.

New manifest analysis options for controlling whether to report file dependency locations for user files, all files, or no files. For example, you may not want to view the file locations of all the dependencies on MathWorks products. This is typical if your main use of Simulink Manifest Tools is to discover and package all the required files for your model. By not analyzing file locations, you speed up report creation, and the report is smaller and easier to navigate. If you need to trace all dependencies to understand why a particular file or toolbox is required by a model, you can always regenerate the full report of all files.

The manifest report is enhanced with sortable columns, and now MATLAB Programs as well as P-files are reported in the manifest if both exist.

For more information, see Model Dependencies in the Simulink User's Guide.

S-Function Builder

The S-Function Builder has been enhanced to support bus signals for managing complex signal interfaces. See Developing S-Functions for more information.

Embedded MATLAB Function Blocks

Support for Variable-Size Arrays and Matrices

Embedded MATLAB Function blocks now support variable-size arrays and matrices with known upper bounds. With this feature, you can define inputs, outputs, and local variables to represent data that varies in size at runtime.

Change in Text and Visibility of Parameter Prompt for Easier Use with Fixed-Point Advisor and Fixed-Point Tool

The Lock output scaling against changes by the autoscaling tool check box is now Lock data type setting against changes by the fixed-point tools. Previously, this check box was visible only if you entered an expression or a fixed-point data type, such as fixdt(1,16,0). This check box is now visible for any data type specification. This enhancement enables you to lock the current data type settings on the dialog box against changes that the Fixed-Point Advisor or Fixed-Point Tool chooses.

New Compilation Report for Embedded MATLAB Function Blocks

The new compilation report provides compile-time type information for the variables and expressions in your Embedded MATLAB functions. This information helps you find the sources of error messages and understand type propagation issues, particularly for fixed-point data types. For more information, see Working with MATLAB Function Reports in the Simulink User's Guide.

Compatibility Considerations

The new compilation report is not supported by the MATLAB internal browser on Sun™ Solaris™ 64-bit platforms. To view the compilation report on Sun Solaris 64-bit platforms, you must configure your MATLAB Web preferences to use an external browser, for example, Mozilla Firefox. To learn how to configure your MATLAB Web preferences, see Web Preferences in the MATLAB documentation.

New Options for Controlling Run-time Checks for Faster Performance

In simulation, the code generated for Embedded MATLAB Function blocks includes various run-time checks. To reduce the size of the generated code, and potentially improve simulation times, you can use new Simulation Target configuration parameters to control whether or not your generated code performs:

Embedded MATLAB Function Blocks Improve Size Propagation Behavior

Heuristics for size propagation have improved for underspecified models. During size propagation, Embedded MATLAB Function blocks no longer provide default sizes. Instead, for underspecified models, Simulink gets defaults from other blocks that have more size information.

Compatibility Considerations

Certain underspecified models that previously ran without error may now generate size mismatch errors. Examples of underspecified models include:

  • Models that contain a cycle in which no block specifies output size

  • Models that do not specify the size of input ports

To eliminate size mismatch errors:

  • Specify sizes for the input ports of your subsystem or model.

  • Specify sizes of all ports on at least one block in any loop in your model.

Simulink Data Management

New Function Exports Workspace Variables and Values

The new Simulink.saveVars function can save workspace variables and their values into a MATLAB file. The file containing the data is human-readable and can be manually edited. If Simulink cannot generate MATLAB code for a workspace variable, Simulink.saveVars saves that variable into a companion MAT-file rather than a MATLAB file. Executing the MATLAB file (which also loads any companion MAT file) restores the saved variables and their values to the workspace. See Simulink.saveVars for more information.

New Enumerated Constant Block Outputs Enumerated Data

Although the Constant block can output enumerated values, it provides many block parameters that do not apply to enumerated types, such as Output minimum and Output maximum. In R2009b, the Sources library includes the Enumerated Constant block. When you need a block that outputs constant enumerated values, use Enumerated Constant rather than Constant to avoid seeing irrelevant block parameters.

Enhanced Switch Case Block Supports Enumerated Data

The Switch Case block now supports enumerated data types for the input signal and case conditions. For more information, see Enumerations and Modeling and the Switch Case block documentation.

Code for Multiport Switch Block Shows Enumerated Values

In previous releases, generated code for a Multiport Switch block that uses enumerated data contains the underlying integer for each enumerated value rather than its name. In R2009b, the code contains the name of each enumerated value rather than its underlying integer. This change adds readability and facilitates comparing the code with the model, but has no effect on the behavior of the code. For more information, see Enumerations and Modeling and Multiport Switch.

Data Class Infrastructure Partially Deprecated

Some classes and properties in the Simulink data class infrastructure have been deprecated in R2009b. See Working with Data for information about Simulink data classes.

Compatibility Considerations

If you use any of the deprecated constructs, Simulink posts a warning that identifies the construct and describes one or more techniques for eliminating it. The techniques differ depending on the construct. You can ignore these warnings in R2009b, but MathWorks recommends making the described changes now because the deprecated constructs may be removed from future releases, upgrading the warnings to errors.

Saving Simulation Results to a Single Object

Enhanced sim command that saves all simulation results to a single object for easier management of simulation results.

Simulation Restart in R2009b

In order to restart an R2009a simulation in R2009b, you should first regenerate the initial SimState in R2009b.

Compatibility Considerations

The SimState that Simulink saves from a R2009a simulation might be incompatible with the internal representation of the same model in R2009b. Simulink detects this incompatibility when the R2009a SimState is used to restart a R2009b simulation. If the mismatch resides in the model interface only, then Simulink issues a warning. (You can use the Simulink diagnostic ‘SimState interface checksum mismatch' to turn off such warnings or to direct Simulink to report an error.) However, if the mismatch resides in the structural representation of the model, then Simulink reports an error. To avoid these errors and warnings, you need to regenerate the initial SimState in R2009b.

Removing Support for Custom Floating-Point Types in Future Release

Support for custom floating-point types, float(TotalBits, ExpBits), will be removed in a future release.

In R2009b, Simulink continues to process these types.

For more information, see float.

Simulink File Management

Removal of Functions

The following functions are no longer available:

  • adams.m

  • euler.m

  • gear.m

  • linsim.m

  • rk23.m

  • rk45.m

Deprecation of SaveAs to R12 and R13

In R2009b, you will no longer be able to use the SaveAs feature to save a model to releases R12 or R13. You will, however, be able to save models to R12 and R13 using the command-line. In R2010a, the command-line capability will also be removed.

Improved Behavior of Save_System

When you use the save_system function to save a model to an earlier release, you will no longer receive a dialog box that indicates that the save was successful.

Simulink Signal Management

Variable-Size Signals

New capability that allows signal sizes to change during execution facilitates modeling of systems with varying environments, resources, and constraints. For Simulink models that demonstrate using variable-size signals, see Working with Variable-Size Signals

Simulink Support

  • Referenced Model

  • Simulink Accelerator and Rapid Accelerator

  • Bus Signals

  • C-mex S-function

  • Level-2 M-file S-function

  • Simulink Debugger

  • Signal Logging and Loading

  • Block Run-Time Object

Simulink Block Support

Support for variable-size signal inputs and outputs in over 40 Simulink blocks including many blocks from the Math Operations library. For a list of Simulink blocks, see Simulink Block Support for Variable-Size Signals

Block Enhancements

New Turnkey PID Controller Blocks for Convenient Controller Simulation and Tuning

You can implement a continuous- or discrete-time PID controller with just one block by using one of the new PID Controller and PID Controller (2DOF) blocks. With the new blocks, you can:

  • Configure your controller in any common controller configuration, including PID, PI, PD, P, and I.

  • Tune PID controller gains either manually in the block or automatically in the new PID Tuner. (PID Tuner requires a Simulink Control Design license.)

  • Generate code to implement your controller using any Simulink data type, including fixed-point data types (requires a Real-Time Workshop license).

You can set many options in the PID Controller and PID Controller (2DOF) blocks, including:

  • Ideal or parallel controller configurations

  • Optional output saturation limit with anti-windup circuitry

  • Optional signal-tracking mode for bumpless control transfer and multiloop controllers

  • Setpoint weighting in the PID Controller (2DOF) block

The blocks are available in the Continuous and Discrete libraries. For more information on using the blocks, see the PID Controller and PID Controller (2DOF) reference pages. For more information on tuning the PID blocks, see Automatic PID Tuning in the Simulink Control Design reference pages.

New Enumerated Constant Block Outputs Enumerated Data

Although the Constant block can output enumerated values, it provides many block parameters that do not apply to enumerated types, such as Output minimum and Output maximum. In R2009b, the Sources library includes the Enumerated Constant block. When you need a block that outputs constant enumerated values, use Enumerated Constant rather than Constant to avoid seeing irrelevant block parameters.

Enhanced Switch Case Block Supports Enumerated Data

The Switch Case block now supports enumerated data types for the input signal and case conditions. For more information, see Enumerations and Modeling and the Switch Case block documentation.

Code for Multiport Switch Block Shows Enumerated Values

In previous releases, generated code for a Multiport Switch block that uses enumerated data contains the underlying integer for each enumerated value rather than its name. In R2009b, the code contains the name of each enumerated value rather than its underlying integer. This change adds readability and facilitates comparing the code with the model, but has no effect on the behavior of the code. For more information, see Enumerations and Modeling and Multiport Switch.

Discrete Transfer Fcn Block Has Performance, Data Type, Dimension, and Complexity Enhancements

The following enhancements apply to the Discrete Transfer Fcn block:

  • Improved numerics and run-time performance of outputs and states by reducing the number of divide operations in the filter to one

  • Support for signed fixed-point and signed integer data types

  • Support for vector and matrix inputs

  • Support for input and coefficients with mixed complexity

  • A new Initial states parameter for entering nonzero initial states

  • A new Optimize by skipping divide by leading denominator coefficient (a0) parameter that provides more efficient implementation by eliminating all divides when the leading denominator coefficient is one. This enhancement provides optimized block performance.

Compatibility Considerations

Due to these enhancements, you might encounter the following compatibility issues:

  • Realization parameter removed

    The Real-Time Workshop software realization parameter has been removed from this block. You can no longer use the set_param and get_param functions on this block parameter. The generated code for this block has been improved to be similar to the former 'sparse' realization when the Optimize by skipping divide by leading denominator coefficient (a0) parameter is selected, while maintaining tunability as in the former 'general' realization when the parameter is not selected.

  • State changes

    Due to the reduction in the number of divide operations that the block performs, you might notice that your logged states have changed when the leading denominator coefficient is not one.

Lookup Table (n-D) Block Supports Parameter Data Types Different from Signal Data Types

The Lookup Table (n-D) block supports breakpoint data types that differ from input data types. This enhancement provides these benefits:

  • Lower memory requirement for storing breakpoint data that uses a smaller type than the input signal

  • Sharing of prescaled breakpoint data between two Lookup Table (n-D) blocks with different input data types

  • Sharing of custom storage breakpoint data in generated code for blocks with different input data types

The Lookup Table (n-D) block supports table data types that differ from output data types. This enhancement provides these benefits:

  • Lower memory requirement for storing table data that uses a smaller type than the output signal

  • Sharing of prescaled table data between two Lookup Table (n-D) blocks with different output data types

  • Sharing of custom storage table data in generated code for blocks with different output data types

The Lookup Table (n-D) block also supports separate data type specification for intermediate results. This enhancement enables use of a higher precision for internal computations than for table data or output data.

For consistency with other lookup table blocks, the Process out-of-range input parameter prompt is now Action for out-of-range input. Similarly, the command-line parameter is now ActionForOutOfRangeInput. For backward compatibility, the old command-line parameter ProcessOutOfRangeInput continues to work. The parameter settings also remain the same: None, Warning, or Error.

Reduced Memory Use and More Efficient Code for Evenly Spaced Breakpoints in Prelookup and Lookup Table (n-D) Blocks

For the Prelookup and Lookup Table (n-D) blocks, the generated code now stores only the first breakpoint, spacing, and number of breakpoints when:

  • The breakpoint data is nontunable.

  • The index search method is Evenly spaced points.

This enhancement reduces memory use and provides faster code execution. Previously, the code stored all breakpoint values in a set, regardless of the tunability or spacing of the breakpoints.

The following enhancements also provide more efficient code for the two blocks:

BlockEnhancement for Code Efficiency
Lookup Table (n-D)Removal of unnecessary bit shifts for calculating the fraction
Prelookup and Lookup Table (n-D)Use of simple division instead of computation-expensive function calls for calculating the index and fraction

Math Function Block Computes Reciprocal of Square Root

The Math Function block now supports a new function for computing the reciprocal of a square root: 1/sqrt. You can use one block instead of two separate blocks for this computation, resulting in smaller block diagrams.

You can select one of two methods for computing the reciprocal of a square root: Exact or Newton-Raphson. Both methods support real input and output signals. When you use the Newton-Raphson method, you can also specify the number of iterations to perform the algorithm.

Math Function Block Enhancements for Real-Time Workshop Code Generation

The Math Function block now supports Real-Time Workshop code generation in these cases:

  • Complex input and output signals for the pow function, for use with floating-point data types

  • Fixed-point data types with fractional slope and nonzero bias for the magnitude^2, square, and reciprocal functions

Relational Operator Block Detects Signals That Are Infinite, NaN, or Finite

The Relational Operator block now includes isInf, isNaN, and isFinite functions to detect signals that are infinite, NaN, or finite. These new functions support real and complex input signals. If you select one of these functions, the block changes automatically to one-input mode.

Changes in Text and Visibility of Dialog Box Prompts for Easier Use with Fixed-Point Advisor and Fixed-Point Tool

The Lock output scaling against changes by the autoscaling tool check box is now Lock output data type setting against changes by the fixed-point tools. Previously, this check box was visible only if you entered an expression or a fixed-point data type for the output, such as fixdt(1,16,0). This check box is now visible for any output data type specification. This enhancement helps you lock the current data type settings on a dialog box against changes that the Fixed-Point Advisor or Fixed-Point Tool chooses.

This enhancement applies to the following blocks:

The Lock scaling against changes by the autoscaling tool check box is now Lock data type settings against changes by the fixed-point tools. Previously, this check box was visible only if you entered an expression or a fixed-point data type, such as fixdt(1,16,0). This check box is now visible for any data type specification. This enhancement helps you lock the current data type settings on a dialog box against changes that the Fixed-Point Advisor or Fixed-Point Tool chooses.

This enhancement applies to the following blocks:

Direct Lookup Table (n-D) Block Enhancements

The Direct Lookup Table (n-D) block now supports:

  • Direct entry of Number of table dimensions

  • Entry of Table data using the Lookup Table Editor

Previously, entering an integer greater than 4 for the Number of table dimensions required editing Explicit number of table dimensions. This extra parameter no longer appears on the block dialog box. For backward compatibility, scripts that contain explicitNumDims continue to work.

The other parameters for the block have changed as follows. For backward compatibility, the old command-line parameters continue to work.

Prompt on Block Dialog BoxOld Command-Line ParameterNew Command-Line Parameter
Number of table dimensionsmaskTabDimsNumberOfTableDimensions
Inputs select this object from tableoutDimsInputsSelectThisObjectFromTable
Make table an inputtabIsInputTableIsInput
Table datamxTableTable
Action for out-of-range inputclipFlagActionForOutOfRangeInput
Sample timesamptimeSampleTime

The read-only BlockType parameter has also changed from S-Function to LookupNDDirect.

Compatibility Considerations

In R2009b, signal dimension propagation can behave differently from previous releases. Your model might not compile under these conditions:

  • A Direct Lookup Table (n-D) block is in a source loop.

  • Underspecified signal dimensions exist.

If your model does not compile, set dimensions explicitly for underspecified signals.

Unary Minus Block Enhancements

Conversion of the Unary Minus block from a masked S-Function to a core block enables more efficient simulation of the block.

You can now specify sample time for the block. The Saturate to max or min when overflows occur check box is now Saturate on integer overflow, and the command-line parameter is now SaturateOnIntegerOverflow. For backward compatibility, the old command-line parameter DoSatur continues to work.

The read-only BlockType parameter has also changed from S-Function to UnaryMinus.

Weighted Sample Time Block Enhancements

Conversions of the Weighted Sample Time and Weighted Sample Time Math blocks from masked S-Functions to core blocks enable more efficient simulation of the blocks.

The following parameter changes apply to both blocks. For backward compatibility, the old command-line parameters continue to work.

Old Prompt on Block Dialog BoxNew Prompt on Block Dialog BoxOld Command-Line ParameterNew Command-Line Parameter
Output data type modeOutput data type

OutputDataType
ScalingMode

OutDataTypeStr

Saturate to max or min when overflows occurSaturate on integer overflow

DoSatur

SaturateOnIntegerOverflow

The read-only BlockType parameter has also changed from S-Function to SampleTimeMath.

Switch Case Block Parameter Change

For the Switch Case block, the command-line parameter for the Show default case check box is now ShowDefaultCase. For backward compatibility, the old command-line parameter CaseShowDefault continues to work.

Signal Conversion Block Parameter Change

For the Signal Conversion block, the parameter prompt for the Override optimizations and always copy signal check box is now Exclude this block from 'Block reduction' optimization.

Compare To Constant and Compare To Zero Blocks Use New Default Setting for Zero-Crossing Detection

The Enable zero-crossing detection parameter is now on by default for the Compare To Constant and Compare To Zero blocks. This change provides consistency with other blocks that support zero-crossing detection.

Signal Builder Block Change

You can no longer see the system under the Signal Builder block mask. In previous releases, you could right-click this block and select Look Under Mask.

In the Model Explorer, the Signal Builder block no longer appears in the Model Hierarchy view. In previous releases, this view was visible.

User Interface Enhancements

Context-Sensitive Help for Simulink Blocks in the Continuous Library

R2009b introduces context-sensitive help for parameters that appear in Simulink blocks of the Continuous library. This feature provides quick access to a detailed description of the block parameters.

To use the context-sensitive help:

  1. Place your pointer over the label of a parameter and right-click.

  2. A What's This? context menu appears.

    For example, the following figure shows the What's This? context menu that appears after right-clicking the Enable zero-crossing detection parameter for the PID Controller block.

  3. Click What's This? A window appears showing a description of the parameter.

Adding Blocks from a Most Frequently Used Blocks List

If you are using the same block repeatedly in a model, then you can save time by using the:

  • Most Frequently Used Blocks tab in the Library Browser

  • Most Frequently Used Blocks context menu option in the Model Editor

These features provide quick access to blocks you have added to models frequently. For details, see Adding Frequently Used Blocks.

Highlighting for Duplicate Inport Blocks

The Highlight to Destination option for a signal provides more information now for duplicate inport blocks. Applying this option to a signal of an inport block that has duplicate blocks highlights:

  • The signal and destination block for that signal

  • The signals and destination blocks of the duplicate blocks at the currently opened level in the model

Using the Model Explorer to Add a Simulink.NumericType Object

You can add a Simulink.NumericType object to the model workspace using the Model Explorer, provided you do not enable the Is alias option.

An example of when you might use this feature is when you:

  • Want to define user-defined data types together in the model

  • Do not need to preserve the data type name in the model or in the generated code

Block Output Display Dialog Has OK and Cancel Buttons

The Block Output Display dialog now includes OK and Cancel buttons to specify whether or not to apply your option settings.

Improved Definition of Hybrid Sample Time

Historically, you could not use the hybrid sample time to effectively identify a multirate subsystem or block. A subsystem was marked as "hybrid" and colored in yellow whether it contained two discrete sample times or one discrete sample time and one or more blocks with constant sample time [inf, 0]. Now, in R2009b, the check for the hybrid attribute no longer includes constant sample times, thereby improving the usefulness of the hybrid sample time color in identifying subsystems (and blocks) that are truly multirate.

Find Option in the Model Advisor

In R2009b, the Model Advisor includes a Find option to help you find checks. The find option, accessible through the Edit menu, allows you to find checks and folders more easily by searching names and analysis descriptions.

For more information, see Overview of the Model Advisor Window.

R2009a

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Saving and Restoring the Complete SimState

Use the new SimState feature to save the complete simulation state. Unlike the final states stored in earlier versions of Simulink, the SimState contains the complete simulation state of the model (including block states that are logged). You can then restore the state at a later time and continue simulation from the exact instant at which you stopped the simulation.

Save Simulink Profiler Results

Save the results of the Simulink Profiler and later regenerate reports for review or for comparison.

Component-Based Modeling

Port Value Displays in Referenced Models

In R2009a, port value displays can appear for blocks in a Normal mode referenced model. To control port value displays, choose View > Port Values in the model window. For complete information about port value displays, see Displaying Port Values.

Parallel Builds Enable Faster Diagram Updates for Large Model Reference Hierarchies In Accelerator Mode

R2009a provides potentially faster diagram updates for models containing large model reference hierarchies by building referenced models that are configured in Accelerator mode in parallel whenever possible. For example, updating of each model block can be distributed across the cores of a multicore host computer.

To take advantage of this feature, Parallel Computing Toolbox™ software must be licensed and installed in your development environment. If Parallel Computing Toolbox software is available, updating a model diagram rebuilds referenced models configured in Accelerator mode in parallel whenever possible.

For example, to use parallel building for updating a large model reference hierarchy on a desktop machine with four cores, you could perform the following steps:

  1. Issue the MATLAB command 'matlabpool 4' to set up a pool of four MATLAB workers, one for each core, in the Parallel Computing Toolbox environment.

  2. Open your model and make sure that the referenced models are configured in Accelerator mode.

  3. Optionally, inspect the model reference hierarchy. For example, you can use the Model Dependency Viewer from the Tools menu of Model Explorer to determine, based on model dependencies, which models will be built in parallel.

  4. Update your model. Messages in the MATLAB command window record when each parallel or serial build starts and finishes.

The performance gain realized by using parallel builds for updating referenced models depends on several factors, including how many models can be built in parallel for a given model referencing hierarchy, the size of the referenced models, and host machine attributes such as amount of RAM and number of cores.

The following notes apply to using parallel builds for updating model reference hierarchies:

  • Parallel builds of referenced models support only local MATLAB workers. They do not support remote workers in MATLAB Distributed Computing Server™ configurations.

  • The host machine should have an appropriate amount of RAM available for supporting the number of local workers (MATLAB sessions) that you plan to use. For example, setting matlabpool to 4 results in five MATLAB sessions on your machine, each using approximately 120 MB of memory at startup.

  • The same MATLAB environment must be set up in each MATLAB worker session as in the MATLAB client session — for example, the same base workspace variables, MATLAB path settings, and so forth. You can do this using the PreLoadFcn callback of the top model. Since the top model is loaded with each MATLAB worker session, its preload function can be used for any MATLAB worker session setup.

Embedded MATLAB Function Blocks

Support for Enumerated Types

Embedded MATLAB Function blocks now support Simulink enumerated types and generate C code for enumerated data. See Using Enumerated Data in MATLAB Function Blocks in the Simulink documentation.

Use of Basic Linear Algebra Subprograms (BLAS) Libraries for Speed

Embedded MATLAB Function blocks now use BLAS libraries to speed up low-level matrix operations during simulation. See Speeding Up Simulation with the Basic Linear Algebra Subprograms (BLAS) Library in the Simulink documentation.

Data Management

Signal Can Resolve to at Most One Signal Object

You can resolve a named signal to a signal object. The object can then specify or validate properties of the signal. For more information, see Simulink.Signal, Using Signal Objects to Initialize Signals and Discrete States, and Using Signal Objects to Tune Initial Values.

In previous releases, you could associate a signal with multiple signal objects, provided that the multiple objects specified compatible signal attributes. In R2009a, a signal can be associated with at most one signal object. The signal can reference the object more than once, but every reference must resolve to exactly the same object. A different signal object that has exactly the same properties will not meet the requirement. See Multiple Signal Objects for more information.

Compatibility Considerations

A compile-time error occurs in R2009a if a model associates more than one signal object with any signal. To prevent the error, decide which object the signal will use, and delete or reconfigure all references to any other signal objects so that all remaining references resolve to the chosen signal object. See Displaying Signal Sources and Destinations for a description of techniques that you can use to trace the full extent of a signal.

"Signed" Renamed to "Signedness" in the Simulink.NumericType class

In previous releases, the Property dialog of a Simulink.NumericType object whose Data type mode was any Fixed-point mode showed a property named Signed, which was a checkbox. Selecting the checkbox specified a signed type; clearing it specified an unsigned type. The API equivalent of Signed was Signed, a Boolean whose values could be 1 (signed) or 0 (unsigned).

In R2009a, a property named Signedness replaces Signed in the Property dialog of a Simulink.NumericType object. You can set Signedness to Signed (the default), Unsigned, or Auto, which specifies that the object inherits its Signedness. The API equivalent of Signedness is Signedness, which can be 1 (signed), 0 (unsigned), or Auto.

For compatibility with existing models, the property Signed remains available in R2009a. Setting Signed in R2009a sets Signedness accordingly. Accessing Signed in R2009a returns the value of Signedness if that value is 0 or 1, or generates an error if the value of Signedness is Auto, because that is not a legal value for Signed.

Do not use the Signed with Simulink.NumericType in new models; use Signedness instead. See Simulink.NumericType for more information.

"Sign" Renamed to "Signedness" in the Data Type Assistant

For blocks and classes that support fixed-point data types, the property Sign previously appeared in the Data Type Assistant when the Mode was Fixed point. In R2009a, this property appears in the Data Type Assistant as Signedness. Only the GUI label of the property differs; its behavior and API are unchanged in all contexts.

Tab Completion for Enumerated Data Types

Tab completion now works for enumerated data types in the same way that it does for other MATLAB classes. See Instantiating Enumerations in MATLAB for details.

Simulink File Management

Model Dependencies Tools

Enhanced file dependency analysis has the following new features:

  • Files in the Simulink manifest are now recorded relative to a project root folder making manifests easier to share, compare and read. See Generate Manifests and Edit Manifests.

  • Command-line dependency analysis can now report toolbox dependencies, and when discovering file dependencies you can optionally generate a manifest file. See Command-Line Dependency Analysis

Block Enhancements

Prelookup and Interpolation Using Prelookup Blocks Support Parameter Data Types Different from Signal Data Types

The Prelookup block supports breakpoint data types that differ from input data types. This enhancement provides these benefits:

  • Enables lower memory requirement for storing breakpoint data that uses a smaller type than the input signal

  • Enables sharing of prescaled breakpoint data between two Prelookup blocks with different input data types

  • Enables sharing of custom storage breakpoint data in generated code for blocks with different input data types

The Interpolation Using Prelookup block supports table data types that differ from output data types. This enhancement provides these benefits:

  • Enables lower memory requirement for storing table data that uses a smaller type than the output signal

  • Enables sharing of prescaled table data between two Interpolation Using Prelookup blocks with different output data types

  • Enables sharing of custom storage table data in generated code for blocks with different output data types

The Interpolation Using Prelookup block also supports separate data type specification for intermediate results. This enhancement enables use of a greater precision for internal computations than for table data or output data.

Lookup Table (n-D) and Interpolation Using Prelookup Blocks Perform Efficient Fixed-Point Interpolations

Whenever possible, Lookup Table (n-D) and Interpolation Using Prelookup blocks use a faster overflow-free subtraction algorithm for fixed-point interpolation. To achieve this efficiency, the blocks use a data type of larger container size to perform the overflow-free subtraction, instead of using control-flow branches as in previous releases. Also, the generated code for fixed-point interpolation is now smaller.

Compatibility Considerations

Due to the change in the overflow-free subtraction algorithm, fixed-point interpolation in Lookup Table (n-D) and Interpolation Using Prelookup blocks might, in a few cases, introduce different rounding results from previous releases. Both simulation and code generation use the new overflow-free algorithm, so they have the same rounding behavior and provide bit-true consistency.

Expanded Support for Simplest Rounding Mode to Maximize Block Efficiency

New Rounding Modes Added to Multiple Blocks

For the following Simulink blocks, the dialog box now displays Convergent and Round as possible rounding modes. These modes enable numerical agreement with embedded hardware and MATLAB results.

In the dialog box for these blocks, the field Round integer calculations toward has been renamed Integer rounding mode. The command-line parameter remains the same.

For more information, see Rounding Mode: Convergent and Rounding Mode: Round in the Fixed-Point Toolbox™ documentation.

Compatibility Considerations

If you use an earlier version of Simulink software to open a model that uses the Convergent or Round rounding mode, the mode changes automatically to Nearest.

Lookup Table (n-D) Block Performs Faster Calculation of Index and Fraction for Power of 2 Evenly-Spaced Breakpoint Data

For power of 2 evenly-spaced breakpoint data, the Lookup Table (n-D) block uses bit shifts to calculate the index and fraction, instead of division. This enhancement provides these benefits:

  • Faster calculation of index and fraction for power of 2 evenly-spaced breakpoint data

  • Smaller size of generated code for the Lookup Table (n-D) block

Discrete FIR Filter Block Supports More Filter Structures

The following filter structures have been added to the Discrete FIR Filter block:

  • Direct form symmetric

  • Direct form antisymmetric

  • Direct form transposed

  • Lattice MA

Running a model with these filter structures requires a Signal Processing Blockset license.

Discrete Filter Block Performance, Data Type, Dimension, and Complexity Enhancements

The following enhancements have been made to the Discrete Filter block:

  • Improved numerics and run-time performance of outputs and states by reducing the number of divide operations in the filter to at most one

  • Support for signed fixed-point and integer data types

  • Support for vector and matrix inputs

  • Support for complex inputs and filter coefficients, where inputs and coefficients can each be real or complex, independently of the other

  • A new Initial states parameter allows you to enter non-zero initial states

  • A new Leading denominator coefficient equals 1 parameter provides a more efficient implementation by eliminating all divides when the leading denominator coefficient is one

Compatibility Considerations

Due to these enhancements, you might encounter the compatibility issues in the following sections.

Realization parameter removed.  The Real-Time Workshop software realization parameter has been removed from this block. You can no longer use the set_param and get_param functions on this block parameter. The generated code for this block has been improved to be similar to the former 'sparse' realization, while maintaining tunability as in the former 'general' realization.

State changes.  Due to the reduction in the number of divide operations performed by the block, you might notice that your logged states have changed when the leading denominator coefficient is not one.

MinMax Block Performs More Efficient and Accurate Comparison Operations

For multiple inputs with mixed floating-point and fixed-point data types, the MinMax block selects an appropriate data type for performing comparison operations, instead of using the output data type for all comparisons, as in previous releases. This enhancement provides these benefits:

  • Faster comparison operations, with fewer fixed-point overflows

  • Smaller size of generated code for the MinMax block

Logical Operator Block Supports NXOR Boolean Operator

In R2009a, the Logical Operator block has been enhanced with a new NXOR Boolean operator. When you select this operator, the block returns TRUE when an even number of inputs are TRUE. Similarly, the block returns FALSE when an even number of inputs are FALSE.

Use NXOR to replace serial XOR and NOT operations in a model.

Discrete-Time Integrator Block Uses Efficient Integration-Limiting Algorithm for Forward Euler Method

When you select the Limit output check box for the Forward Euler method, the Discrete-Time Integrator block uses only one saturation when a second saturation is unnecessary. This change in the integration-limiting algorithm provides these benefits:

  • Faster integration

  • Smaller size of generated code for the Discrete-Time Integrator block

Dot Product Block Converted from S-Function to Core Block

Conversion of the Dot Product block from a masked S-Function to a core block enables more efficient simulation and better handling of the block in Simulink models.

Due to this conversion, you can specify sample time and values for the output minimum and maximum for the Dot Product block. The read-only BlockType parameter has also changed from S-Function to DotProduct.

Compatibility Considerations

In R2009a, signal dimension propagation might behave differently from previous releases. As a result, your model might not compile under these conditions:

  • Your model contains a Dot Product block in a source loop.

  • Your model has underspecified signal dimensions.

If your model does not compile, set dimensions for signals that are not fully specified.

For example, your model might not compile in this case:

  • Your model contains a Transfer Fcn Direct Form II Time Varying block, which is a masked S-Function with a Dot Product block in a source loop.

  • The second and third input ports of the Transfer Fcn Direct Form II Time Varying block are unconnected, which results in underspecified signal dimensions.

To ensure that your model compiles in this case, connect Constant blocks to the second and third input ports of the Transfer Fcn Direct Form II Time Varying block and specify the signal dimensions for both ports explicitly.

Pulse Generator Block Uses New Default Values for Period and Pulse Width

For the Pulse Generator block, the default Period value has changed from 2 to 10, and the default Pulse Width value has changed from 50 to 5. These changes enable easier transitions between time-based and sample-based mode for the pulse type.

Random Number, Uniform Random Number, and Unit Delay Blocks Use New Default Values for Sample Time

The default Sample time values for the Random Number, Uniform Random Number, and Unit Delay blocks have changed:

  • The default Sample time value for the Random Number and Uniform Random Number blocks has changed from 0 to 0.1.

  • The default Sample time value for the Unit Delay block has changed from 1 to –1.

Trigonometric Function Block Provides Better Support of Accelerator Mode

The Trigonometric Function block now supports Accelerator mode for all cases with real inputs and Normal mode support. For more information about simulation modes, see Accelerating Models in the Simulink User's Guide.

Reshape Block Enhanced with New Input Port

The Reshape block Output dimensionality parameter has a new option, Derive from reference input port. This option creates a second input port, Ref, on the block and derives the dimensions of the output signal from the dimensions of the signal input to the Ref input port. Similarly, the Reshape block command-line parameter, OutputDimensionality, has the new option, Derive from reference input port.

Subsystem Blocks Enhanced with Read-Only Property That Indicates Virtual Status

The following subsystem blocks now have the property, IsSubsystemVirtual. This read-only property returns a Boolean value, on or off, to indicate if a subsystem is virtual.

User Interface Enhancements

Port Value Displays in Referenced Models

In R2009a, port value displays can appear for blocks in a Normal mode referenced model. To control port value displays, choose View > Port Values in the model window. For complete information about port value displays, see Displaying Port Values.

Print Sample Time Legend

Print the Sample Time Legend either as an option of the block diagram print dialog box or directly from the legend. In either case, the legend will print on a separate sheet of paper. For more information, see Print Sample Time Legend.

M-API for Access to Compiled Sample Time Information

New MATLAB API provides access to the compiled sample time data, color, and annotations for a specific block or the entire block diagram directly from M code.

Model Advisor Report Enhancements

In R2009a, the Model Advisor report is enhanced with:

  • The ability to save the report to a location that you specify.

  • Improved readability, including the ability to:

    • Filter the report to view results according to the result status. For example, you can now filter the report to show errors and warnings only.

    • Collapse and expand the folder view in the report.

    • View a summary of results for each folder in the report.

See Consulting the Model Advisor in the Simulink User's Guide.

Counterclockwise Block Rotation

This release lets you rotate blocks counterclockwise as well as clockwise (see How to Rotate a Block for more information).

Physical Port Rotation for Masked Blocks

This release lets you specify that the ports of a masked block not be repositioned after a clockwise rotation to maintain a left-to-right and top-to-bottom numbering of the ports. This enhancement facilitates use of masked blocks in mechanical systems, hydraulic systems, and other modeling applications where block diagrams do not have a preferred orientation (see Port Rotation Type for more information.)

Smart Guides

In R2009a, when you drag a block, Simulink draws lines, called smart guides, that indicate when the block's ports, center, and edges align with the ports, centers, and edges of other blocks in the same diagram. This helps you create well-laid-out diagrams (see Smart Guides for more information).

Customizing the Library Browser's User Interface

Release 2009a lets you customize the Library Browser's user interface. You can change the order in which libraries appear in the Library Browser, disable or hide libraries, sublibraries, and blocks, and add, disable, or hide items on the Library Browser's menus. See Customizing the Library Browser for more information.

Subsystem Creation Command

This release adds a command, Simulink.BlockDiagram.createSubSystem, that creates a subsystem from a specified group of blocks.

Removal of Lookup Table Designer from the Lookup Table Editor

In R2009a, the Lookup Table Designer is no longer available in the Lookup Table Editor.

Compatibility Considerations

Previously, you could select Edit > Design Table in the Lookup Table Editor to launch the Lookup Table Designer. In R2009a, this menu item is no longer available.

S-Functions

Level-1 Fortran S-Functions

In this release, if you attempt to compile or simulate a model with a Level-1 Fortran S-function, you will receive an error due to the use of the newly deprecated function 'MXCREATEFULL' within the Fortran S-function wrapper 'simulink.F'. If your S-function does not explicitly use 'MXCREATEFULL', simply recompile the S-function. If your S-function uses 'MXCREATEFULL', replace each instance with 'MXCREATEDOUBLEMATRIX' and recompile the S-function.

R2008b

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Parallel Simulations in Rapid Accelerator Mode

Simulink now has the capability to run parallel simulations in Rapid Accelerator mode using parfor on prebuilt Simulink models.

You can now run parallel simulations in Rapid Accelerator mode with different external inputs and tunable parameters. The sim command can be called from a parfor loop if the model does not require a rebuild.

For more information, see Running a Simulation Programmatically.

Improved Rebuild Mechanism in Rapid Accelerator Mode

Simulink now has enhanced tuning of the solver and logging parameters in Rapid Accelerator mode without requiring a rebuild.

An improved rebuild mechanism ensures that the model does not rebuild when you change block diagram parameters (e.g., stop time, solver tolerances, etc.). This enhancement significantly decreases the time for simulation in Rapid Accelerator mode.

Data Type Size Limit on Accelerated Simulation Removed

In previous releases, accelerated simulation was not supported for models that use integer or fixed-point data types greater than 32 bits in length. In this release, the acceleration limit on integer and fixed-point data type size has increased to 128 bits, the same as the limit for normal-mode, i.e., unaccelerated simulation.

New Initialization Behavior in Conditional, Action, and Iterator Subsystems

For releases prior to 2008b, at the simulation start time, Simulink initializes all blocks unconditionally and subsystems cannot reset the states. Release 2008b introduces behavior that mirrors the behavior of Real-Time Workshop. For normal simulation mode, the Simulink block initialization method (mdlInitializeConditions) can be called more than once at the start time if:

  • The block is contained within a Conditional, Action, or Iterator subsystem.

  • The subsystem is configured to reset states when enabled (or triggered); and the subsystem is enabled (or triggered) at the start time.

This new initialization behavior has the following effect on S-functions:

  • If you need to ensure that the initialization code in the mdlInitializeConditions function runs only once, then move this initialization code into the mdlStart method. MathWorks recommends this code change as a best practice.

  • The change to the block initialization method, as described above, exposed a bug in the S-function macro ssIsFirstInitCond for applications involving an S-function within a Conditional, Action or Iterator subsystem. This bug has been fixed in R2008b.

    To determine if you consequently need to update your Simulink S-functions for compatibility, compare the simulation results from R2007b or an earlier release with those of R2008b. If they differ at the start time, ssIsFirstInitCond is running more than once and you must regenerate and recompile the appropriate Simulink S-functions.

    For Real-Time Workshop, you must regenerate and recompile all S-function targets and any Real-Time Workshop target for which the absolute time is turned on. (If a third-party vendor developed your S-functions, have the vendor regenerate and recompile them for you. The vendor can use the SLDiagnostics feature to identify all S-functions in a model.)

Component-Based Modeling

Processor-in-the-Loop Mode in Model Block

In R2008b, Simulink has a new Model block simulation mode for processor-in-the-loop (PIL) verification of generated code. This feature requires Real-Time Workshop Embedded Coder software. The feature lets you test the automatically generated and cross-compiled object code on your embedded processor by easily switching between Normal, Accelerator, and PIL simulation modes in your original model. You can reuse test suites, resulting in faster iteration between model development and generated code verification. For more information, see Referenced Model Simulation Modes.

Conditionally Executed Subsystem Initial Conditions

R2008b of Simulink includes enhanced handling of initial conditions for conditionally executed subsystems, Merge blocks, and Discrete-Time Integrator blocks, improving consistency of simulation results.

This feature allows you to select simplified initialization mode for conditionally executed subsystems, Merge blocks, subsystem elapsed time, and Discrete-Time Integrator blocks. The simplified initialization improves the consistency of simulation results, especially for models that do not specify initial conditions for conditional subsystem output ports, and for models that have conditionally executed subsystem output ports connected to S-functions.

    Note:   To use the new simplified initialization mode, you must activate this feature.

Activating This Feature for New Models

For new models, you can activate this feature as follows:

  1. In the model window, select Simulation > Configuration Parameters.

    The Configuration Parameters dialog box opens.

  2. Select Diagnostics > Data Validity.

    The Data Validity Diagnostics pane opens.

  3. In the Model Initialization section, set Underspecified initialization detection to Simplified.

  4. Select Diagnostics > Connectivity.

    The Connectivity Diagnostics pane opens.

  5. Set Mux blocks used to create bus signals to error.

  6. Set Bus signal treated as vector to error.

  7. Click OK.

For more information, see Underspecified initialization detection.

Migrating Existing Models

For existing models, MathWorks recommends using the Model Advisor to migrate your model to the new simplified initialization mode settings.

To migrate an existing model:

  1. In the model window, select Simulation > Configuration Parameters.

    The Configuration Parameters dialog box opens.

  2. Select Diagnostics > Data Validity.

    The Data Validity Diagnostics pane opens.

  3. In the Merge Block section, set Detect multiple driving blocks executing at the same time step to error.

  4. Click OK.

  5. Simulate the model and ensure that it runs without errors.

  6. Select Tools > Model Advisor.

    The Model Advisor opens.

  7. In the Model Advisor Task Manager, select By Product > Simulink.

  8. Run Check bus usage in the Model Advisor.

  9. Run Check consistency of initialization parameters for Outport and Merge blocks in the Model Advisor.

  10. After you have resolved any errors identified by this check, click Proceed to migrate your model to simplified initialization mode.

For information on using the Model Advisor, see Consulting the Model Advisor in the Simulink User's Guide.

For information on the Model Advisor checks, see Check consistency of initialization parameters for Outport and Merge blocks.

Compatibility Considerations

Activating this feature can cause differences in simulation results, when compared to previous versions. Since you must opt-in to this feature before any changes are made, there are no issues for existing models. However, MathWorks recommends that you backup existing models before you migrate them, in case you want to return to the original behavior.

Model Block Input Enhancement

Model block inputs can now be local and reusable. This capability reduces global data usage and data copying when interfacing with code from a referenced model, which can reduce memory usage during simulation and increase the efficiency of generated code. This enhancement is always relevant, so no configuration parameter is necessary or provided to control it.

One Parameter Controls Accelerator Mode Build Verbosity

In previous releases, the ModelReferenceSimTargetVerbose parameter controlled verbosity when a referenced model was built for execution in Accelerator mode, as specified by the Model block's Simulation mode parameter. The ModelReferenceSimTargetVerbose had no GUI equivalent. See Referenced Model Simulation Modes and the Model block documentation for more information.

A different parameter, AccelVerboseBuild, controls the verbosity when a model is built in Simulink Accelerator mode or Rapid Accelerator mode, as specified in the Simulation menu. See Accelerating Models for more information. The GUI equivalent of the AccelVerboseBuild parameter is Configuration Parameters > Optimization > Verbose accelerator builds. See Verbose accelerator builds for more information.

All types of accelerated simulation entail code generation (though the code is not visible to the user) and the two verbosity parameters control whether a detailed account of the code generation process appears in the MATLAB Command Window. However, providing separate verbosity parameters for the two cases was unnecessary.

In R2008b, the ModelReferenceSimTargetVerbose parameter is deprecated and has no effect. The AccelVerboseBuild parameter (Configuration Parameters > Optimization > Verbose accelerator builds) now controls the verbosity for Simulink Accelerator mode, referenced model Accelerator mode, and Rapid Accelerator mode.

Another parameter, RTWVerbose (Configuration Parameters > Real-Time Workshop > Debug > Verbose build) controls the verbosity of Real-Time Workshop code generation. This parameter is unaffected by the changes to ModelReferenceSimTargetVerbose and AccelVerboseBuild.

Compatibility Considerations

In R2008b, trying to set ModelReferenceSimTargetVerbose generates a warning message and has no effect on verbosity. The warning says to use AccelVerboseBuild instead. The default for AccelVerboseBuild is 'off'.

A model saved in R2008b will not include the ModelReferenceSimTargetVerbose parameter. An R2008b model saved to an earlier Simulink version that supports ModelReferenceSimTargetVerbose will include that parameter, giving it the same value that AccelVerboseBuild has in the R2008b version.

The effect of loading a model from an earlier Simulink version into R2008b depends on the source version:

  • Prior to R14: Neither parameter exists, so no compatibility consideration arises.

  • R14 – R2006b: Only ModelReferenceSimTargetVerbose exists. Copy its value to AccelVerboseBuild.

  • R2007a: Both parameters exist but neither has a GUI equivalent. Ignore the value of ModelReferenceSimTargetVerbose and post no warning.

  • R2007b – R2008a: Both parameters exist and AccelVerboseBuild and has a GUI equivalent. If ModelReferenceSimTargetVerbose is 'on', post a warning to use AccelVerboseBuild instead.

Embedded MATLAB Function Blocks

Support for Fixed-Point Word Lengths Up to 128 Bits

Embedded MATLAB Function blocks now support up to 128 bits of fixed-point precision. This increase in maximum precision from 32 to 128 bits supports generating efficient code for targets with non-standard word sizes and allows Embedded MATLAB Function blocks to work with large fixed-point signals.

Enhanced Simulation and Code Generation Options for Embedded MATLAB Function Blocks

You can now specify embeddable code generation options from the Embedded MATLAB Editor using a new menu item: Tools > Open RTW Target. Simulation options continue to be available from Tools > Open Simulation Target.

In addition, simulation and embeddable code generation options now appear in a single dialog box. For details, see Unified Simulation and Embeddable Code Generation Options.

Data Type Override Now Works Consistently on Outputs

When you enable data type override for Embedded MATLAB Function blocks, outputs with explicit and inherited types are converted to the override type. For example, if you set data type override to true singles, the Embedded MATLAB Function block converts all outputs to single type and propagates the override type to downstream blocks.

In previous releases, Embedded MATLAB Function blocks did not apply data type override to outputs with inherited types. Instead, the inherited type was preserved even if it did not match the override type, sometimes causing errors during simulation.

Compatibility Considerations

Applying data type override rules to outputs with inherited types may introduce the following compatibility issues:

  • Downstream Embedded MATLAB Function blocks must be able to accept the propagated override type. Therefore, you must allow data type override for downstream blocks for which you set output type explicitly. Otherwise, you may not be able to simulate your model.

  • You might get unexpected simulation results if the propagated type uses less precision than the original type.

Improperly-Scaled Fixed-Point Relational Operators Now Match MATLAB Results

When evaluating relational operators, Embedded MATLAB Function blocks compute a common type that encompasses both input operands. In previous releases, if the common type required more than 32 bits, Embedded MATLAB Function blocks may have given different answers from MATLAB. Now, Embedded MATLAB Function blocks give the same answers as MATLAB.

Compatibility Considerations

Some relational operators generate multi-word code even if one of the fixed-point operands is not a multi-word value. To work around this issue, cast both operands to the same Fixed-Point Toolbox type (using the same scaling method and properties).

Data Management

Support for Enumerated Data Types

Simulink models now support enumerated data types. For details, see:

Simulink Bus Editor Enhancements

The Simulink Bus Editor can now filter displayed bus objects by either name or relationship. See Filtering Displayed Bus Objects for details.

You can now fully customize the export and import capabilities of the Simulink Bus Editor. See Customizing Bus Object Import and Export for details.

New Model Advisor Check for Data Store Memory Usage

A new Model Advisor check posts advice and warnings about the use of Data Store Memory, Data Store Read, and Data Store Write blocks. See Check Data Store Memory blocks for multitasking, strong typing, and shadowing issues for details.

Simulink File Management

Model Dependencies Tools

Enhanced file dependency analysis can now:

  • Find system target files

  • Analyze STF_make_rtw_hook functions

  • Analyze all configuration sets, not just the active set.

See Scope of Dependency Analysis in the Simulink User's Guide.

Block Enhancements

Trigonometric Function Block

R2008b provides an enhanced Trigonometric Function block to:

  • Support sincos

  • Provide greater floating-point consistency

Math Function Block

In Simulink 2008b, an enhanced Math Function block provides greater floating-point consistency.

Merge Block

R2008b provides enhanced handling of initial conditions for the Merge block and thus improves the consistency of simulation results.

Discrete-Time Integrator Block

R2008b provides an enhanced handling of initial conditions for the Discrete-Time Integrator block and thereby improves the consistency of simulation results.

Modifying a Link to a Library Block in a Callback Function Can Cause Illegal Modification Errors

In this release, Simulink software can signal an error if a block callback function, e.g., CopyFcn, modifies a link to a library block. For example, an error occurs if you attempt to copy a library link to a self-modifying masked subsystem whose CopyFcn deletes a block contained by the subsystem. This change means that you cannot use block callback functions to create self-modifying library blocks. Mask initialization code for a library block is the only code allowed to modify the block.

Compatibility Considerations

Previous releases allowed use of block callback functions to create self-modifying library blocks. Opening, editing, or running models that contain links to such blocks can cause illegal modification errors in the current release. As a temporary work around, you can break any links in your model to a library block that uses callback functions to modify itself. The best long-term solution is to move the self-modification code to the block's mask initialization section.

Random Number Block

In the dialog box for the Random Number block, the field Initial Seed has been renamed Seed. The command-line parameter remains the same.

Signal Generator Block

The Signal Generator block now supports multidimensional signals. For a list of blocks that support multidimensional signals, see Signal Dimensions in the Simulink User's Guide.

Sum Block

The accumulator of the Sum block now applies for all input signals of any data type (for example, double, single, integer, and fixed-point). In previous releases, the accumulator of this block was limited to inputs and outputs of only integer or fixed-point data types.

Switch Block

The Switch block now supports the immediate back propagation of a known output data type to the first and third input ports. This occurs when you set the Output data type parameter to Inherit: Inherit via internal rule and select the Require all data port inputs to have the same data type check box. In previous releases, this back propagation did not occur immediately.

Uniform Random Number Block

In the dialog box for the Uniform Random Number block, the field Initial Seed has been renamed Seed. The command-line parameter remains the same.

User Interface Enhancements

Sample Time

The display of sample time information has been expanded to include:

  • Signal lines labeling with new color-independent Annotations

  • A new Sample Time Legend maps the sample time Colors and Annotations to sample times.

  • A distinct color for indicating that a block and signal are asynchronous.

The section "Modeling and Simulation of Discrete Systems" has been renamed "Working with Sample Times" and has been significantly expanded to provide a comprehensive review of sample times and a discussion on the new Sample Time Legend and Sample Time Display features. For more information, see Working with Sample Times.

Model Advisor

In R2008b, the Model Advisor is enhanced with:

  • A model and data restore point that provides you with the ability to revert changes made in response to advice from the Model Advisor

  • Context-sensitive help available for Model Advisor checks

  • Tristate check boxes that visually indicate selected and cleared checks in folders

  • A system selector for choosing the system level that the Model Advisor checks

See Consulting the Model Advisor in the Simulink User's Guide.

"What's This?" Context-Sensitive Help for Commonly Used Blocks

R2008b introduces context-sensitive help for parameters that appear in the following commonly used blocks in Simulink:

Bus Creator
Bus Selector
Constant
Data Type Conversion
Demux
Discrete-Time Integrator
Gain
Inport
Integrator
Logical Operator
Mux
Outport
Product
Relational Operator
Saturation
Subsystem
Sum
Switch
Terminator
Unit Delay

This feature provides quick access to a detailed description of the parameters, saving you the time it would take to find the information in the Help browser.

To use the "What's This?" help, do the following:

  1. Place your cursor over the label of a parameter.

  2. Right-click. A What's This? context menu appears.

    For example, the following figure shows the What's This? context menu appearing after right-clicking the Multiplication parameter for the Gain block.

  3. Click What's This? A context-sensitive help window appears showing a description of the parameter.

Compact Icon Option Displays More Blocks in Library Browser

This release introduces a compact icon option that maximizes the number of blocks and libraries visible in the Library Browser's Library pane without scrolling (see Library Pane).

Signal Logging and Test Points Are Controlled Independently

In previous releases, a signal could be logged only if it was also a test point. Therefore, selecting Log signal data in the Signal Properties dialog box automatically selected Test point, and disabled it so that it could not be cleared. However, a signal can be a test point without being logged, so clearing Log signal data did not automatically clear Test point. The same asymmetric behavior occurred programmatically with the underlying DataLogging and TestPoint parameters.

In R2008b, no connection exists between enabling logging for a signal and making the signal a test point. Either, both, or neither capability can be enabled for any signal. Selecting and clearing Log signal data therefore has no effect on the setting of Test point, and similarly for the underlying parameters. See Exporting Signal Data Using Signal Logging and Working with Test Points for more information.

To reflect the independence of logging and test points, the command Test Point Indicators in the Simulink Format > Port/Signal Displays menu has been renamed Testpoint/Logging Indicators. The effect of the command, the graphical indicators displayed, and the meaning of the underlying parameter ShowTestPointIcons, are all unchanged.

Compatibility Considerations

Scripts and practices that relied on Log signal data to automatically set a test point must be changed to set the test point explicitly. The relevant set_param commands are:

set_param(PortHandle(n),'DataLogging','on')
set_param(PortHandle(n),'TestPoint','on')

To disable either capability, set the relevant parameter to 'off'. See Enabling Logging for a Signal for an example.

Signal Logging Consistently Retains Duplicate Signal Regions

A virtual signal is a signal that graphically represents other signals or parts of other signals. Virtual signals are purely graphical entities; they have no functional or mathematical significance. The nonvirtual components of a virtual signal are called regions. For example, if Mux block (which is a virtual block) inputs two nonvirtual signals, the block outputs a virtual signal that has two regions. See Virtual Signals and Mux Signals for more information.

In previous releases, when a virtual signal contains duplicate regions, signal logging excluded all but one of the duplicates in some contexts, but included all of the duplicates in other contexts, giving inconsistent results. For example, if the same nonvirtual signal is connected to two input ports of a Mux block, that one signal is the source of two regions in the Mux block output. Previously, if that output was being logged in Normal mode simulation, the log object would contain data for only one of the regions, because the other was eliminated as a duplicate.

In R2008a, Simulink no longer eliminates duplicate regions when logging the output of virtual blocks like Mux or Selector blocks. Simulink now logs all regions, which appear in a Simulink.TsArray object. The duplicate regions have unique names as follows:

<signal_name>_reg<#counter> 

This change affects signal logs and all capabilities that depend on signal logging, such as scopes and signal viewers.

Compatibility Considerations

In cases where signal logging previously omitted duplicate regions, signal logs will now be larger, and scopes and signal viewers will now show more data. This change could give the impression that the results of simulation have changed, but actually only the logging of those results has changed. No action is needed unless:

  • A dependency exists on the exact size of a log or the details of its contents.

  • The size and details have changed due to the inclusion of previously omitted signals.

In such a case, make changes as needed to accept the changed logging behavior. See Exporting Signal Data Using Signal Logging for more information.

Simulink Configuration Parameters

In R2008b, the following Simulink configuration parameters are updated:

    Note:   The command-line parameter name is not changing for these parameters.

LocationPrevious ParameterNew Parameter
SolverStates shape preservation / ShapePreserveControlShape preservation / ShapePreserveControl
SolverConsecutive min step size violations / MaxConsecutiveMinStepNumber of consecutive min steps / MaxConsecutiveMinStep
SolverConsecutive zero crossings relative tolerance / ConsecutiveZCsStepRelTolTime tolerance / ConsecutiveZCsStepRelTol
SolverZero crossing location algorithm / ZeroCrosAlgorithmAlgorithm / ZeroCrosAlgorithm
SolverZero crossing location threshold / ZCThresholdSignal threshold/ ZCThreshold
SolverNumber of consecutive zero crossings allowed / MaxConsecutiveZCsNumber of consecutive zero crossings / MaxConsecutiveZCs
OptimizationEliminate superfluous temporary variables (Expression folding) / ExpressionFoldingEliminate superfluous local variables (Expression folding) / ExpressionFolding
OptimizationRemove internal state zero initialization / ZeroInternalMemoryAtStartupRemove internal data zero initialization / ZeroInternalMemoryAtStartup

In R2008b, the following Simulink configuration parameters have moved:

    Note:   The command-line parameter name is not changing for these parameters.

ParameterOld LocationNew Location
Check undefined subsystem initial outputDiagnostics > CompatibilityDiagnostics > Data Validity
Check preactivation output of execution contextDiagnostics > CompatibilityDiagnostics > Data Validity
Check runtime output of execution context Diagnostics > CompatibilityDiagnostics > Data Validity

In R2008b, the Optimization > Minimize array reads using temporary variables parameter has been obsoleted.

Model Help Menu Update

The Simulink model Help menu now includes links to block support tables for the following products, if they are installed.

  • Simulink

  • Communications Blockset™

  • Signal Processing Blockset

  • Video and Image Processing Blockset™

To obtain the block support tables for all of these products that are installed, select Help > Block Support Table > All Tables.

In previous releases, Help > Block Support Table provided such tables only for the main Simulink library.

Unified Simulation and Embeddable Code Generation Options

You can now specify both simulation and embeddable code generation options in the Configuration Parameters dialog box. The simulation options apply only to Embedded MATLAB Function blocks, Stateflow charts, and Truth Table blocks.

The following table summarizes changes that apply for Embedded MATLAB Function blocks:

Type of ModelSimulation OptionsEmbeddable Code Generation Options
Nonlibrary

Migrated from the Simulation Target dialog box to the Configuration Parameters dialog box.

See:

New menu item in the Embedded MATLAB Editor for specifying code generation options for nonlibrary models: Tools > Open RTW Target

New options in the Real-Time Workshop pane of the Configuration Parameters dialog box.

See:

Library

Migrated from the Simulation Target dialog box to the Configuration Parameters dialog box.

See:

New menu item in Embedded MATLAB Editor for specifying custom code generation options for library models: Tools > Open RTW Target

For a description of these options, see Library Models: Support for Specifying Custom Code Options in the Real-Time Workshop Pane of the Configuration Parameters Dialog Box.

For details about the new options, see Configuration Parameters Dialog Box in the Simulink Graphical User Interface documentation. For compatibility information, see ???.

For changes specific to Stateflow, see Unified Simulation and Embeddable Code Generation Options for Stateflow Charts and Truth Table Blocks in the Stateflow and Stateflow Coder™ release notes.

Nonlibrary Models: Changes for the General Pane of the Simulation Target Dialog Box

The following sections describe changes in the panes of the Simulation Target dialog box for nonlibrary models.

ReleaseAppearance
Previous

General pane of the Simulation Target dialog box

New

Simulation Target pane of the Configuration Parameters dialog box

For details, see Nonlibrary Models: Mapping of GUI Options from the Simulation Target Dialog Box to the Configuration Parameters Dialog Box.

Nonlibrary Models: Changes for the Custom Code Pane of the Simulation Target Dialog Box

ReleaseAppearance
Previous

Custom Code pane of the Simulation Target dialog box

New

Simulation Target > Symbols pane of the Configuration Parameters dialog box

New

Simulation Target > Custom Code pane of the Configuration Parameters dialog box

For details, see Nonlibrary Models: Mapping of GUI Options from the Simulation Target Dialog Box to the Configuration Parameters Dialog Box.

Nonlibrary Models: Changes for the Description Pane of the Simulation Target Dialog Box

In previous releases, the Description pane of the Simulation Target dialog box appeared as follows.

In R2008b, these options are no longer available. For older models where the Description pane contained information, the text is now accessible only in the Model Explorer. When you select Simulink Root > Configuration Preferences in the Model Hierarchy pane, the text appears in the Description field for that model.

Nonlibrary Models: Mapping of GUI Options from the Simulation Target Dialog Box to the Configuration Parameters Dialog Box

For nonlibrary models, the following table maps each GUI option in the Simulation Target dialog box to the equivalent in the Configuration Parameters dialog box. The options are listed in order of appearance in the Simulation Target dialog box.

Old Option in the Simulation Target Dialog BoxNew Option in the Configuration Parameters Dialog BoxDefault Value of New Option
General > Enable debugging / animationSimulation Target > Enable debugging / animationon
General > Enable overflow detection (with debugging)Simulation Target > Enable overflow detection (with debugging)on
General > Echo expressions without semicolonsSimulation Target > Echo expressions without semicolonson
General > Build ActionsSimulation Target > Simulation target build modeIncremental build
NoneSimulation Target > Custom Code > Source file''
Custom Code > Include CodeSimulation Target > Custom Code > Header file''
Custom Code > Include PathsSimulation Target > Custom Code > Include directories''
Custom Code > Source FilesSimulation Target > Custom Code > Source files''
Custom Code > LibrariesSimulation Target > Custom Code > Libraries''
Custom Code > Initialization CodeSimulation Target > Custom Code > Initialize function''
Custom Code > Termination CodeSimulation Target > Custom Code > Terminate function''
Custom Code > Reserved NamesSimulation Target > Symbols > Reserved names{}
Custom Code > Use these custom code settings for all librariesNoneNot applicable
Description > Description

None

    Note:   If you load an older model that contained user-specified text in the Description field, that text now appears in the Model Explorer. When you select Simulink Root > Configuration Preferences in the Model Hierarchy pane, the text appears in the Description field for that model.

Not applicable
Description > Document LinkNoneNot applicable

    Note:   For nonlibrary models, Simulation Target options in the Configuration Parameters dialog box are also available in the Model Explorer. When you select Simulink Root > Configuration Preferences in the Model Hierarchy pane, you can select Simulation Target in the Contents pane to access the options.

Library Models: Changes for the General Pane of the Simulation Target Dialog Box

In previous releases, the General pane of the Simulation Target dialog box for library models appeared as follows.

In R2008b, these options are no longer available. All library models inherit these option settings from the main model to which the libraries are linked.

Library Models: Changes for the Custom Code Pane of the Simulation Target Dialog Box

ReleaseAppearance
Previous

Custom Code pane of the Simulation Target dialog box

New

Simulation Target pane of the Configuration Parameters dialog box

For details, see Library Models: Mapping of GUI Options from the Simulation Target Dialog Box to the Configuration Parameters Dialog Box.

Library Models: Changes for the Description Pane of the Simulation Target Dialog Box

In previous releases, the Description pane of the Simulation Target dialog box appeared as follows.

In R2008b, these options are no longer available. For older models where the Description pane contained information, the text is discarded.

Library Models: Mapping of GUI Options from the Simulation Target Dialog Box to the Configuration Parameters Dialog Box

For library models, the following table maps each GUI option in the Simulation Target dialog box to the equivalent in the Configuration Parameters dialog box. The options are listed in order of appearance in the Simulation Target dialog box.

Old Option in the Simulation Target Dialog BoxNew Option in the Configuration Parameters Dialog BoxDefault Value of New Option
General > Enable debugging / animationNoneNot applicable
General > Enable overflow detection (with debugging)NoneNot applicable
General > Echo expressions without semicolonsNoneNot applicable
General > Build ActionsNoneNot applicable
NoneSimulation Target > Source file''
Custom Code > Include CodeSimulation Target > Header file''
Custom Code > Include PathsSimulation Target > Include directories''
Custom Code > Source FilesSimulation Target > Source files''
Custom Code > LibrariesSimulation Target > Libraries''
Custom Code > Initialization CodeSimulation Target > Initialize function''
Custom Code > Termination CodeSimulation Target > Terminate function''
Custom Code > Reserved NamesNoneNot applicable
Custom Code > Use local custom code settings (do not inherit from main model)Simulation Target > Use local custom code settings (do not inherit from main model)off
Description > DescriptionNoneNot applicable
Description > Document LinkNoneNot applicable

    Note:   For library models, Simulation Target options in the Configuration Parameters dialog box are not available in the Model Explorer.

Nonlibrary Models: Enhancement for the Real-Time Workshop: Symbols Pane of the Configuration Parameters Dialog Box

In previous releases, the Real-Time Workshop > Symbols pane of the Configuration Parameters dialog box appeared as follows.

In R2008b, a new option is available in this pane: Reserved names. You can use this option to specify a set of keywords that the Real-Time Workshop build process should not use. This action prevents naming conflicts between functions and variables from external environments and identifiers in the generated code.

You can also choose to use the reserved names specified in the Simulation Target > Symbols pane to avoid entering the same information twice for the nonlibrary model. Select the option Use the same reserved names as Simulation Target.

Nonlibrary Models: Enhancement for the Real-Time Workshop: Custom Code Pane of the Configuration Parameters Dialog Box

In previous releases, the Real-Time Workshop > Custom Code pane of the Configuration Parameters dialog box appeared as follows.

In R2008b, a new option is available in this pane: Use the same custom code settings as Simulation Target. You can use this option to copy the custom code settings from the Simulation Target > Custom Code pane to avoid entering the same information twice for the nonlibrary model.

Library Models: Support for Specifying Custom Code Options in the Real-Time Workshop Pane of the Configuration Parameters Dialog Box

In R2008b, you can specify custom code options in the Configuration Parameters dialog box, as shown:

For more information, see Code Generation Pane: Custom Code in the Real-Time Workshop documentation.

Mapping of Target Object Properties to Parameters in the Configuration Parameters Dialog Box

Previously, you could programmatically set options for simulation and embeddable code generation of models containing Embedded MATLAB Function blocks, Stateflow charts, or Truth Table blocks by accessing the API properties of Target objects sfun and rtw, respectively. In R2008b, the API properties of Target objects sfun and rtw are replaced by parameters that you configure using the commands get_param and set_param.

For compatibility details, see ???.

Mapping of Object Properties to Simulation Parameters for Nonlibrary Models

The following table maps API properties of the Target object sfun for nonlibrary models to the equivalent parameters in R2008b. Object properties are listed in alphabetical order; those not listed in the table do not have equivalent parameters in R2008b.

Old sfun Object PropertyOld Option in the Simulation Target Dialog BoxNew Configuration ParameterNew Option in the Configuration Parameters Dialog Box

CodeFlagsInfo
('debug')

General > Enable debugging / animation

SFSimEnableDebug

string - off, on

Simulation Target > Enable debugging / animation

CodeFlagsInfo
('overflow')

General > Enable overflow detection (with debugging)

SFSimOverflowDetection

string - off, on

Simulation Target > Enable overflow detection (with debugging)

CodeFlagsInfo
('echo')

General > Echo expressions without semicolons

SFSimEcho

string - off, on

Simulation Target > Echo expressions without semicolons
CustomCodeCustom Code > Include Code

SimCustomHeaderCode

string - ''

Simulation Target > Custom Code > Header file
CustomInitializerCustom Code > Initialization Code

SimCustomInitializer

string - ''

Simulation Target > Custom Code > Initialize function
CustomTerminatorCustom Code > Termination Code

SimCustomTerminator

string - ''

Simulation Target > Custom Code > Terminate function

ReservedNames

Custom Code > Reserved Names

SimReservedNameArray

string array - {}

Simulation Target > Symbols > Reserved names
UserIncludeDirsCustom Code > Include Paths

SimUserIncludeDirs

string - ''

Simulation Target > Custom Code > Include directories
UserLibrariesCustom Code > Libraries

SimUserLibraries

string - ''

Simulation Target > Custom Code > Libraries
UserSourcesCustom Code > Source Files

SimUserSources

string - ''

Simulation Target > Custom Code > Source files

Mapping of Object Properties to Simulation Parameters for Library Models

The following table maps API properties of the Target object sfun for library models to the equivalent parameters in R2008b. Object properties are listed in alphabetical order; those not listed in the table do not have equivalent parameters in R2008b.

Old sfun Object PropertyOld Option in the Simulation Target Dialog BoxNew Configuration ParameterNew Option in the Configuration Parameters Dialog Box
CustomCodeCustom Code > Include Code

SimCustomHeaderCode

string - ''

Simulation Target > Header file
CustomInitializerCustom Code > Initialization Code

SimCustomInitializer

string - ''

Simulation Target > Initialize function
CustomTerminatorCustom Code > Termination Code

SimCustomTerminator

string - ''

Simulation Target > Terminate function

UseLocalCustomCodeSettings

Custom Code > Use local custom code settings (do not inherit from main model)

SimUseLocalCustomCode

string - off, on

Simulation Target > Use local custom code settings (do not inherit from main model)
UserIncludeDirsCustom Code > Include Paths

SimUserIncludeDirs

string - ''

Simulation Target > Include directories
UserLibrariesCustom Code > Libraries

SimUserLibraries

string - ''

Simulation Target > Libraries
UserSourcesCustom Code > Source Files

SimUserSources

string - ''

Simulation Target > Source files

Mapping of Object Properties to Code Generation Parameters for Library Models

The following table maps API properties of the Target object rtw for library models to the equivalent parameters in R2008b. Object properties are listed in alphabetical order; those not listed in the table do not have equivalent parameters in R2008b.

Old rtw Object PropertyOld Option in the RTW Target Dialog BoxNew Configuration ParameterNew Option in the Configuration Parameters Dialog Box
CustomCodeCustom Code > Include Code

CustomHeaderCode

string - ''

Real-Time Workshop > Header file
CustomInitializerCustom Code > Initialization Code

CustomInitializer

string - ''

Real-Time Workshop > Initialize function
CustomTerminatorCustom Code > Termination Code

CustomTerminator

string - ''

Real-Time Workshop > Terminate function
UseLocalCustomCodeSettingsCustom Code > Use local custom code settings (do not inherit from main model)

RTWUseLocalCustomCode

string - off, on

Real-Time Workshop > Use local custom code settings (do not inherit from main model)
UserIncludeDirsCustom Code > Include Paths

CustomInclude

string - ''

Real-Time Workshop > Include directories
UserLibrariesCustom Code > Libraries

CustomLibrary

string - ''

Real-Time Workshop > Libraries
UserSourcesCustom Code > Source Files

CustomSource

string - ''

Real-Time Workshop > Source files

Compatibility Considerations

When you load and save older models in R2008b, not all target property settings are preserved.

 What Happens When You Load an Older Model in R2008b

 What Happens When You Save an Older Model in R2008b

New Parameters in the Configuration Parameters Dialog Box for Simulation and Embeddable Code Generation

In R2008b, new parameters are added to the Configuration Parameters dialog box for simulation and embeddable code generation of models that contain Embedded MATLAB Function blocks, Stateflow charts, or Truth Table blocks.

New Simulation Parameters for Nonlibrary Models

The following table lists the new simulation parameters that apply to nonlibrary models.

New Configuration ParameterNew Option in the Configuration Parameters Dialog BoxDescription

SimBuildMode

string – sf_incremental_build, sf_nonincremental_build, sf_make, sf_make_clean, sf_make_clean_objects

Simulation Target > Simulation target build modeSpecifies how you build the simulation target for a model.

SimCustomSourceCode

string - ''

Simulation Target > Custom Code > Source fileEnter code lines to appear near the top of a generated source code file.

New Simulation Parameter for Library Models

The following table lists the new simulation parameter that applies to library models.

New Configuration ParameterNew Option in the Configuration Parameters Dialog BoxDescription

SimCustomSourceCode

string - ''

Simulation Target > Source fileEnter code lines to appear near the top of a generated source code file.

New Code Generation Parameters for Nonlibrary Models

The following table lists the new code generation parameters that apply to nonlibrary models.

New Configuration ParameterNew Option in the Configuration Parameters Dialog BoxDescription

ReservedNameArray

string array - {}

Real-Time Workshop > Symbols > Reserved namesEnter the names of variables or functions in the generated code that match the names of variables or functions specified in custom code.

RTWUseSimCustomCode

string – off, on

Real-Time Workshop > Custom Code > Use the same custom code settings as Simulation TargetSpecify whether to use the same custom code settings as those specified for simulation.

UseSimReservedNames

string – off, on

Real-Time Workshop > Symbols > Use the same reserved names as Simulation TargetSpecify whether to use the same reserved names as those specified for simulation.

New Code Generation Parameters for Library Models

The following table lists the new code generation parameters that apply to library models.

New Configuration ParameterNew Option in the Configuration Parameters Dialog BoxDescription

CustomSourceCode

string''

Real-Time Workshop > Source fileEnter code lines to appear near the top of a generated source code file.

RTWUseSimCustomCode

string – off, on

Real-Time Workshop > Use the same custom code settings as Simulation TargetSpecify whether to use the same custom code settings as those specified for simulation.

S-Functions

Ada S-Functions

In future releases, Simulink will not have a built-in Ada S-function capability. As a mitigation strategy, call Ada code from Simulink using standard Ada 95 language features and the Simulink C-MEX S-function API. For details of this process, please contact Technical Support at MathWorks.

Legacy Code Tool Enhancement

The Legacy Code Tool data structure has been enhanced with a new S-function options field, singleCPPMexFile, which when set to true

  • Requires you to generate and manage an inlined S-function as only one file (.cpp) instead of two (.c and .tlc)

  • Maintains model code style—level of parentheses usage and preservation of operand order in expressions and condition expressions in if statements—as specified by model configuration parameters.

When you choose not to use this option, code generated by the Legacy Code Tool does not reflect code style configuration settings and requires you to manage C-MEX and TLC files.

For more information, see:

Compatibility Considerations

  • If you upgrade from an earlier release, you can continue to use S-functions generated from the Legacy Code Tool available in earlier releases. You can continue to compile the S-function source code and you can continue to use the compiled output from an earlier release without recompiling the code.

  • If you set the new singleCPPMexFile options field to true, when creating an S-function, you cannot use that S-function, in source or compiled form, with versions of Simulink earlier than Version 7.2 (R2008b).

MATLAB Changes Affecting Simulink

Changes to MATLAB Startup Options

The matlab command line arguments -memmgr and -check_malloc are deprecated and will be removed in a future release.

Handle Graphics Not Supported Under -nojvm Startup Option

If you start MATLAB using the command matlab -nojvm (which disables Java), you will receive warnings when using many graphical tools, for example, when you create figures, print Simulink models, or view Simulink scopes.

For more information, see Changes to -nojvm Startup Option in the Desktop Tools and Development Environment release notes.

R2008a

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Rapid Accelerator

Improved Rapid Accelerator sim-command performance when running long simulations of small models on Microsoft Windows® platforms.

Long Rapid Accelerator mode simulations of small models invoked by the sim command under the Microsoft Windows operating system now run faster.

Additional Zero Crossing Algorithm

A second zero crossing algorithm that is especially useful in systems exhibiting strong chattering behavior has been added for use with variable step solvers.

The new algorithm is selected by choosing Adaptive from the Zero crossing location algorithm option in the Solver pane of the Configuration Parameter dialog. The default algorithm is Non-Adaptive, which is the algorithm used prior to this release.

For more information, see Zero-Crossing Algorithms.

Component-Based Modeling

Efficient Parent Model Rebuilds

In previous releases, changing a referenced model that executed in Accelerator mode or was used for code generation triggered rebuilding every model that directly or indirectly referenced the changed model. The rebuilding occurred even if the change to the referenced model had no effect on its interface to its parent(s).

In R2008a, changing a referenced model that executes in Accelerator mode or is used for code generation triggers rebuilding a parent model only when the change directly affects the referenced model's interface to the parent model. This behavior eliminates unnecessary code regeneration, which can significantly reduce the time needed to update a diagram.

The faster diagram update has no effect on simulation behavior or performance, but may change the messages that appear in the MATLAB Command Window. See Referencing a Model for information about model referencing.

Scalar Root Inputs Passed Only by Reference

The Configuration Parameters > Model Referencing > Pass scalar root inputs by value option is Off by default, indicating that scalar root inputs are passed by reference. In previous releases, setting the option to On affected both simulation and generated code, and caused scalar root inputs to be passed by value. In R2008a, the option has no effect on simulation: scalar root inputs are now always passed by reference, regardless of the setting of Pass scalar root inputs by value. The effect of the option on code generation is the same as in previous releases. See Pass fixed-size scalar root inputs by value for code generation for more information.

Unlimited Referenced Models

In previous releases, Microsoft Windows imposed a limit on the number of models that could be referenced in Accelerator mode in a model hierarchy. This limitation is removed in R2008a. Under Microsoft Windows, as on all other platforms, the number of referenced models that can appear in a model hierarchy is effectively unlimited. See Referencing a Model for information about model referencing.

Embedded MATLAB Function Blocks

Nontunable Structure Parameters

Embedded MATLAB Function blocks now support nontunable MATLAB structure parameters. For more information, see Working with Structure Parameters in MATLAB Function Blocks.

Bidirectional Traceability

You can navigate between a line of generated code and its corresponding line of source code in Embedded MATLAB Function blocks. For more information, see Using Traceability in MATLAB Function Blocks.

Specify Scaling Explicitly for Fixed-Point Data

When you define data of fixed-point type in Embedded MATLAB Function blocks, you must specify the scaling explicitly in the General pane of the Data properties dialog box. For example, you cannot enter an incomplete specification such as fixdt(1,16) in the Type field. If you do not specify scaling explicitly, you will see an error message when you try to simulate your model.

To ensure that the data type definition is valid for fixed-point data, perform one of these steps in the General pane of the Data properties dialog box:

  • Use a predefined option in the Type drop-down menu.

  • Use the Data Type Assistant to specify the Mode as fixed-point.

Compatibility Considerations

Previously, you could omit scaling in data type definitions for fixed-point data. Such data types were treated as integers with the specified sign and word length. This behavior has changed. Embedded MATLAB Function blocks created in earlier versions may now generate errors if they contain fixed-point data with no scaling specified.

Data Management

Array Format Cannot Be Used to Export Multiple Matrix Signals

When you export signals to a workspace in Array format from more than one outport, none of the signals can be a matrix signal. In previous releases, violating this rule did not always cause an error, but the matrix data was not exported correctly. In R2008a, violating the rule always causes an error, and no data export occurs.

When exporting data to a workspace in Array format from multiple outports, use a Reshape block to convert any matrix signal to a one-dimensional (1-D) array. This restriction applies only to Array format. If you specify either Structure or Structure with time format, you can export matrix signals to a workspace from multiple outports without first converting the signals to vectors.

Compatibility Considerations

The more stringent error checking in R2008a can cause models that export data in Array format from multiple outports to generate errors rather than silently exporting matrix data incorrectly. To eliminate such errors, use a Reshape block to convert any matrix signal to a vector, or switch to Structure or Structure with time format. See Exporting Simulation Data for information about data export.

Bus Editor Upgraded

The Simulink Bus Editor has been reimplemented to provide a GUI interface similar to that of the Model Explorer, and to provide several new capabilities, including importing/exporting data from MAT-files and M-files, defining bus objects and elements with the Data Type Assistant, and creating and viewing bus hierarchies (nested bus objects). See Using the Bus Editor for details.

Changing Nontunable Values Does Not Affect the Current Simulation

In previous releases, changing the value of any variable or parameter during simulation took effect immediately. In R2008a, only changes to tunable variables and parameters take effect immediately. Other changes have no effect until the next simulation begins. This modification causes simulation behavior to match generated code behavior when the values of nontunable variables and parameters change, and it improves efficiency by eliminating unnecessary re-evaluation. For information about parameter tuning, see Tunable Parameters and Using Tunable Parameters.

Compatibility Considerations

In R2008a, simulation behavior will differ if the behavior in a previous release depended on changing any nontunable variable or parameter during simulation. To regain the previous behavior, define as tunable any nontunable variable or parameter that you want to change during simulation for the purpose of affecting simulation immediately.

Detection of Illegal Rate Transitions

Illegal rate transitions between a block and a triggered subsystems or function call subsystems are now detected when the block is connected to a Unit Delay or Zero Hold block inside a triggered subsystem.

Compatibility Considerations

In this release, Simulink detects illegal rate transition errors when the block sample time is different from the triggered subsystem sample time in those models where the block is connected to a Unit Delay or Zero Hold block inside the triggered subsystem.

Explicit Scaling Required for Fixed-Point Data

In R2008a, when you define a fixed-point data type in a Simulink model, you must explicitly specify the scaling unless the block supports either integer scaling mode or best-precision scaling mode. If a block supports neither of these modes, you cannot define an incomplete fixed-point data type like fixdt(1,16), which specifies no scaling. See Specifying a Fixed-Point Data Type and Showing Fixed-Point Details for information about defining fixed-point data types.

Compatibility Considerations

In previous releases, you could define a fixed-point data type that specified no scaling in a block that supported neither integer scaling mode nor best-precision scaling mode. The Simulink software posted no warning, and treated fixed-point data type as an integer data type with the specified word length. For example, fixdt(1,16) was treated as fixdt(1,16,0).

In R2008a, a fixed-point data type definition that specifies no scaling generates an error unless the block supports either integer scaling mode or best-precision scaling mode. If such an error occurs when you compile a model from an earlier Simulink version, redefine the incomplete fixed-point data type to be an integer type if nothing more is needed, or to be scaled appropriately for its value range.

Fixed-Point Details Display Available

The Data Type Assistant can now display the status and details of fixed-point data types. See Specifying a Fixed-Point Data Type and Showing Fixed-Point Details for more information.

More than 2GB of Simulation Data Can be Logged on 64-Bit Platforms

When you log time, states, final states, and signals on a 64-bit platform, you can now save more simulation data in the MATLAB base workspace than was previously possible.

  • When you log data using the Structure, Structure with time, or Timeseries format, you can now save up to 2^48-1 bytes in each field that contains logged data.

  • When you log data using Array format, you can now save up to 2^48-1 bytes in each array that contains logged data.

Previously the limit was 2^31-1 bytes in each field or array containing logged data. See Exporting Signal Data Using Signal Logging and Data Import/Export Pane for information about logging data.

Order of Simulink and MPT Parameter and Signal Fields Changed

The order of the fields in the Simulink.Parameter and Simulink.Signal classes, and in their respective subclasses mpt.Parameter and mpt.Signal, has changed in R2008a.

The order for Simulink.Parameter (and mpt.Parameter) is now:

Simulink.Parameter (handle)
          Value: []
        RTWInfo: [1x1 Simulink.ParamRTWInfo]
    Description: ''
       DataType: 'auto'
            Min: -Inf
            Max: Inf
       DocUnits: ''
     Complexity: 'real'
     Dimensions: [0 0]

The order for Simulink.Signal (and mpt.Signal) is now:

Simulink.Signal (handle)
         RTWInfo: [1x1 Simulink.SignalRTWInfo]
     Description: ''
        DataType: 'auto'
             Min: -Inf
             Max: Inf
        DocUnits: ''
      Dimensions: -1
      Complexity: 'auto'
      SampleTime: -1
    SamplingMode: 'auto'
    InitialValue: ''

Loading a model that uses any Simulink.Parameter or mpt.Parameter objects, and was saved in a release prior to R2008a, may post an Inconsistent Data warning in the MATLAB Command Window. This message does not indicate a problem with the model, which need not be changed. Resave the model in R2008a to update it to use the new parameter class definitions. The warning will not appear when you reopen the model.

Range Checking for Complex Numbers

Previous releases did not provide range checking for complex numbers, and attempting it generated an error. In R2008a, you can specify a minimum and/or maximum value for a complex number wherever range checking is available and a complex number is a legal value.

The specified minimum and maximum values apply separately to the real part and to the imaginary part of the complex number. If the value of either part of the number is less than the minimum, or greater than the maximum, the complex number is outside the specified range.

No range checking occurs against any combination of the real and imaginary parts, such as (sqrt(a^2+b^2)). See Checking Parameter Values and Signal Ranges for information about range checking.

Rate Transition Blocks Needed on Virtual Buses

In this release, Simulink never automatically inserts a Rate Transition block into a virtual bus, even if Automatically handle rate transfer is selected. Instead, an error is displayed indicating that a Rate Transition block must be manually inserted.

Compatibility Considerations

Some models that worked in previous releases, but were dependent on automatic Rate Transition block insertion, will now report an error and will no longer run. An error will be reported if all of these apply:

  • The Automatically handle rate transfer option is enabled

  • The model is multirate

  • The model has a virtual bus, all of the elements on the bus have the same data type, and the sample time changes

  • A bus selector block is not present on the virtual bus at a point after the sample time changes

  • The only way to address the rate transition problem is to insert a rate transition block

Sample Times for Virtual Blocks

In models with asynchronous function calls, some virtual blocks now correctly assign generic sample times instead of triggered sample times.

Compatibility Considerations

The CompiledSampleTime parameter now reports the compiled sample time as generic sample time (that is, [-1, -inf]) rather than triggered sample time ([-1,-1]) for virtual blocks for which all of the flowing is true:

  • The virtual block is downstream from an asynchronous source

  • The virtual block is not inside a triggered subsystem

  • The virtual block had a triggered ([-1,-1]) sample time in previous releases

The simulation results, code generation, and sample time colors are not affected by this change.

Signals Needing Resolution Are Graphically Indicated

In R2008a, the Simulink Editor by default graphically indicates signals that must resolve to signal objects. For any labeled signal whose Signal name must resolve to signal object property is enabled, a signal resolution icon appears to the left of the signal name. The icon looks like this:

A signal resolution icon indicates only that a signal's Signal name must resolve to signal object property is enabled. The icon does not indicate whether the signal is actually resolved, and does not appear on a signal that is implicitly resolved without its Signal name must resolve to signal object property being enabled. See Signal Resolution Indicators for more information.

Simulink File Management

Autosave

New Autosave option automatically creates a backup copy of models before updating or simulating. If you open or load a model which has a more recent autosave copy available, a dialog appears where you can choose to overwrite the original model file with the autosave copy.

You can set the Autosave option in the Simulink Preferences Window. See Autosave in the Simulink Graphical User Interface documentation.

Old Version Notification

New option to notify when loading a model saved in a previous version of Simulink software.

You can set this option in the Simulink Preferences Window. See Simulink Preferences Window: Main Pane in the Simulink Graphical User Interface documentation.

Model Dependencies Tools

Enhanced file dependency analysis now also detects:

  • TLC files required by S-functions.

  • .fig files created by GUIDE.

  • Files referenced by common data loading functions. File names passed to xlsread, importdata, dlmread, csvread, wk1read, and textread are now identified, in addition to the existing capability for load, fopen and imread.

See Scope of Dependency Analysis in the Using Simulink documentation.

Block Enhancements

New Discrete FIR Filter Block Replaces Weighted Moving Average Block

The Discrete FIR Filter block in the Discrete library is new for this release. This block independently filters each channel of the input signal with the specified digital FIR filter. The Discrete FIR Filter block replaces the Weighted Moving Average block.

Compatibility Considerations

You should replace Weighted Moving Average blocks in your existing models with the Discrete FIR Filter block. To do this, run the slupdate command on your models.

Rate Transition Block Enhancements

Support for Rate Transition blocks has been enhanced in the following ways:

  • Rate Transition block output port sample time now can be specified as a multiple of input port sample time, using the new Rate Transition block parameters Output port sample time options and Sample time multiple (>0). See the Rate Transition block documentation for more information.

  • In previous releases, auto-insertion of Rate Transition blocks was selected for a model using the option Automatically handle data transfers between tasks on the Solver pane of the Configuration Parameters dialog box. When selected, auto-insertion always ensured data transfer determinism for periodic tasks.

    This release allows you to control the level of data transfer determinism when auto-insertion of Rate Transition blocks is selected for your model. The Solver pane option for selecting auto-insertion has been renamed to Automatically handle rate transition for data transfer. Selecting auto-insertion now enables a new option, Deterministic data transfer. Selecting Never (minimum delay) or Whenever possible for this option can provide reduced latency for models that do not require determinism. See the Solver Pane section in the Simulink Graphical User Interface documentation for more information.

  • Auto-insertion of Rate Transition blocks is now supported for additional rate transitions, such as sample times with nonzero offset, and between non-integer-multiple sample times.

Enhanced Lookup Table (n-D) Block

The Lookup Table (n-D) block now supports all data types, complex table data, and nonscalar inputs. See the Lookup Table (n-D) block documentation for more information.

New Accumulator Parameter on Sum Block

The Sum block dialog box displays a new parameter for specifying the data type of its accumulator. See the Sum block documentation for more information.

User Interface Enhancements

Simulink Library Browser

A new version of the Simulink Library browser has the following enhancements:

  • Now available on all platforms supported by Simulink software.

  • Improved performance for browsing and searching of libraries, by allowing these operations to proceed without actually loading the libraries.

  • Enhanced search finds all blocks and displays search results in a separate tab.

  • New option to display library blocks in a compact grid layout that conserves screen space.

Simulink Preferences Window

New unified Simulink Preferences window for configuring default settings. The new Preferences window allows you to configure file change notifications, autosave options, fonts, display options, and model configuration defaults.

See Simulink Preferences Window: Main Pane in the Simulink Graphical User Interface documentation.

Model Advisor

In R2008a, the Model Advisor tool is enhanced with improved GUI navigation, check analysis, and reports including:

  • Reset option that reverts the status of all checks to Not Run while keeping the current check selection.

  • Model Advisor Result Explorer to make changes to your model.

  • Input Parameters to provide inputs to checks.

  • Check results reported in the same order as the Model Advisor tree.

  • The ability to generate reports for any folder.

  • Timestamps in reports indicating when checks run at different times.

See Consulting the Model Advisor in the Simulink User's Guide.

Solver Controls

Enhanced controls in the Solver pane of the Configuration Parameters dialog. The Solver pane of the Configuration Parameters dialog has been changed as follows:

  • The Solver diagnostic controls pane has been removed and two new panes have been added (Tasking and sample time options, and Zero crossing options)

  • The Automatically handle data transfers between tasks control has been moved to the Tasking and sample time options pane, and has been renamed Automatically handle rate transition for data transfer

  • The Higher priority value indicates higher task priority control has been moved to the Tasking and sample time options pane

  • The Number of consecutive min step size violations allowed control has been moved to the Solver options pane, and has been renamed Consecutive min step size violations allowed

  • The States shape preservation control has been added to the Solver options pane

  • The Consecutive zero crossings relative tolerance control has been moved to the Zero crossing options pane

  • The Number of consecutive zero crossings allowed control has been moved to the Zero crossing options pane

  • The Zero crossing control control has been moved to the Zero crossing options pane

  • The Zero crossing location algorithm control has been added to the Zero crossing options pane

  • The Zero crossing location threshold control has been added to the Zero crossing options pane

  • Options that in previous releases were only visible when enabled are now always visible. They are grayed when not enabled.

For more information on the Configuration parameters solver pane, see Solver Pane.

Compatibility Considerations

The Solver pane of the Configuration Parameter dialog has been restructured, and many parameters have moved or been renamed. Please refer to the list of changes above for information on specific parameters.

"What's This?" Context-Sensitive Help Available for Simulink Configuration Parameters Dialog

R2008a introduces "What's This?" context-sensitive help for parameters that appear in the Simulink Configuration Parameters dialog. This feature provides quick access to a detailed description of the parameters, saving you the time it would take to find the information in the Help browser.

To use the "What's This?" help, do the following:

  1. Place your cursor over the label of a parameter.

  2. Right-click. A What's This? context menu appears.

    For example, the following figure shows the What's This? context menu appearing after a right-click on the Start time parameter in the Solver pane.

  3. Click What's This? A context-sensitive help window appears showing a description of the parameter.

S-Functions

Simplified Level-2 M-File S-Function Template

New basic version of the Level-2 M-file S-function template msfuntmpl_basic.m simplifies creating Level-2 M-file S-functions. See Writing Level-2 MATLAB S-Functions in Writing S-Functions for more information.

Compatibility Considerations

MATLAB V7.6 (R2008a) on Linus Torvalds' Linux® platforms is now built with a compiler that utilizes glibc version 2.3.6. To work with MATLAB V7.6 (R2008a), MEX-file S-functions compiled on a Linux® platform must be rebuilt.

R2007b

New Features, Bug Fixes, Compatibility Considerations

Simulation Performance

Simulink Accelerator

Simulink Accelerator™ has been incorporated into Simulink software, and a new Rapid Accelerator mode has been added for faster simulation through code generation technology. See Accelerating Models in Simulink User's Guide.

    Note:   When using From File blocks in Rapid Accelerator mode, the corresponding MAT file must be in the current directory.

Compatibility Considerations

A license is no longer required to use the Accelerator or Rapid Accelerator modes.

Simulink Profiler

Simulink Profiler has been incorporated into Simulink software for the identification of simulation performance bottlenecks. See Capturing Performance Data in Simulink User's Guide.

Compiler Optimization Level

Simulink Accelerator mode, Rapid Accelerator mode, and model reference simulation targets can now specify the compiler optimization level used (choose between minimizing compilation time or simulation time). See Customizing the Build Process in Simulink User's Guide.

Compatibility Considerations

The new model configuration parameter Compiler optimization level defaults to Optimizations off (faster builds). As a result, you might notice shorter build times, but longer execution times, compared to previous releases. However, any previously defined custom compiler optimization options using OPT_OPTS will be honored, and model behavior should be unchanged.

Variable-Step Discrete Solver

Simulink software has been enhanced to no longer take unnecessary time steps at multiples of the maximum step size when using a variable-step discrete solver.

Referenced Models Can Execute in Normal or Accelerator Mode

In previous releases, Simulink software executed all referenced models by generating code for them and executing the generated code. In this release, Simulink software can execute appropriately configured referenced models interpretively. Such execution is called Normal mode execution, and execution via generated code is now called Accelerator mode execution. The technique of executing a referenced model via generated code has not changed, but it did not previously need a separate name because it was the only alternative.

Many restrictions that previously applied to all referenced model execution now apply only to Accelerator mode execution, and are relaxed in Normal mode. For example, some Simulink tools that did not work with referenced models because they are incompatible with generated code can now be used by executing the referenced model in Normal mode.

Normal mode also has some restrictions that do not apply to Accelerator mode. For example, at most, one instance of a given model in a referenced model hierarchy can execute in Normal mode. See Referencing a Model in Simulink User's Guide for information about using referenced models in Normal and Accelerator mode.

Accelerator and Model Reference Targets Now Use Standard Internal Functions

For more consistent simulation results, Simulink Accelerator mode, Rapid Accelerator mode, and the model reference simulation target now perform mathematical operations with the same internal functions that MATLAB and Simulink products use.

Component-Based Modeling

New Instance View Option for the Model Dependency Viewer

The Model Dependency viewer has a new option to display each reference to a model and indicate whether the reference is simulated in Accelerator or Normal mode. See Referencing a Model and Model Dependency Viewer in Simulink User's Guide.

Mask Editor Now Requires Java

The Mask Editor now requires that the MATLAB product start with Java enabled. See Simulink Mask Editor in Simulink User's Guide.

Compatibility Considerations

You can no longer use the Mask Editor if you start MATLAB with the -nojvm option.

Embedded MATLAB Function Blocks

Complex and Fixed-Point Parameters

Embedded MATLAB Function blocks now support complex and fixed-point parameters.

Support for Algorithms That Span Multiple M-Files

You can now generate embeddable code for external M-functions from Embedded MATLAB function blocks. This feature allows you to call external functions from multiple locations in an M-file or model and include these functions in the generated code.

Compatibility Considerations

In previous releases, Embedded MATLAB function blocks did not compile external M-functions, but instead dispatched them to the MATLAB product for execution (after warning). Now, the default behavior is to compile and generate code for external M-functions called from Embedded MATLAB function blocks. If you do not want Embedded MATLAB function blocks to compile external M-functions, you must explicitly declare them to be extrinsic, as described in Calling MATLAB Functions in the Embedded MATLAB documentation.

Loading R2007b Embedded MATLAB Function Blocks in Earlier Versions of Simulink Software

If you save Embedded MATLAB Function blocks in R2007b, you will not be able to load the corresponding model in earlier versions of Simulink software. To work around this issue, save your model in the earlier version before loading it, as follows:

  1. In the Simulink Editor, select File > Save As.

  2. In the Save as type field, select the version in which you want to load the model.

    For example, if you want to load the model in Simulink R2007a, select Simulink 6.6/R2007a Models (*.mdl).

Data Management

New Diagnostic for Continuous Sample Time on Non-Floating-Point Signals

A new diagnostic detects continuous sample time on non-floating-point signals.

New Standardized User Interface for Specifying Data Types

This release introduces a new standardized user interface, the Data Type Assistant, for specifying data types associated with Simulink blocks and data objects, as well as Stateflow data. See Using the Data Type Assistant in Simulink User's Guide for more information.

The Data Type Assistant appears on the dialogs of the following Simulink blocks:

The Data Type Assistant appears on the dialogs of the following Simulink data objects:

New Block Parameters for Specifying Minimum and Maximum Values

The following new block parameters are available for specifying the minimum and maximum values of signals and other block parameters.

  • Output minimum, Minimum

  • Output maximum, Maximum

  • Parameter minimum

  • Parameter maximum

These new parameters selectively appear on the dialogs of the following Simulink blocks:

New Range Checking of Block Parameters

In this release, Simulink software performs range checking of parameters associated with blocks that specify minimum and maximum values (see New Block Parameters for Specifying Minimum and Maximum Values). Simulink software alerts you when values of block parameters lie outside a range that corresponds to its specified minimum and maximum values and data type. See Checking Parameter Values in Simulink User's Guide for more information.

New Diagnostic for Checking Signal Ranges During Simulation

In the Configuration Parameters dialog, the Diagnostics > Data Validity pane contains a new diagnostic, Simulation range checking, which alerts you during simulation when blocks output signals that exceed specified minimum or maximum values (see New Block Parameters for Specifying Minimum and Maximum Values). For more information about using this diagnostic, see Signal Ranges in Simulink User's Guide.

Configuration Management

Disabled Library Link Management

The following new features help manage disabled library links and protect against accidental loss of work:

  • "Disabled Link" appears in the title bar of a Model Editor window that displays a subsystem connected to a library by a disabled link.

  • ToolTips for library-linked blocks include the link status as well as the destination block for the link.

  • New diagnostics warn when saving a model that contains disabled or parameterized library links.

  • New Model Advisor checks let you search for disabled or parameterized library links in a model.

Model Dependencies Tools

The model dependencies manifest tools have these new capabilities:

Embedded Software Design

Legacy Code Tool Enhancement

The Legacy Code Tool has been enhanced to allow the use of void* and void** to declare variables that represent memory allocated for specific instances of items such as file descriptors, device drivers, and memory managed externally.

For more information, see:

Block Enhancements

Product Block Reorders Inputs Internally

In previous releases, a Product block whose

  • Number of inputs parameter begins with a divide character (/)

  • Multiplication parameter specifies Element-wise(.*)

computes the reciprocal of its first input before multiplying or dividing by subsequent inputs. For example, if a Product block specifies division for its first input, u1, and multiplication for its second input, u2, previous versions of Simulink software compute

(1 / u1) * u2

In this release, the Product block internally reorders its first two inputs if particular conditions apply, such that Simulink software now computes

u2 / u1

See the Product block documentation for more information.

Block Data Tips Now Work on All Platforms

In previous releases, block data tips worked only on Microsoft Windows platforms. In this release, the data tips work on all platforms. Also, the data tip for a library link, even if disabled, now includes the name of the library block it references.

Enhanced Data Type Support for Blocks

The following blocks now allow you to specify the data type of their outputs:

The following blocks now support single-precision floating-point inputs, outputs, and parameter values:

New Simulink Data Class Block Object Properties

The following properties have been added to the Simulink.BlockData class:

  • AliasedThroughDataType

  • AliasedThroughDataTypeID

New Break Link Options for save_system Command

The save_system command's BreakLink option has been replaced by two options: BreakAllLinks and BreakUserLinks. The first option duplicates the behavior of the obsolete BreakLink option, i.e., it replaces all library links, including links to Simulink block libraries with copies of the referenced library blocks. The BreakUserLinks option replaces only links to user-defined libraries.

Compatibility Considerations

The save_system command continues to honor the BreakLink option but displays a warning message at the MATLAB command line that the option is deprecated.

Simulink Software Checks Data Type of the Initial Condition Signal of the Integrator Block

When the output port of the Constant or IC block is connected to the Initial Condition port of the Integrator block, Simulink software now compares the data type of the Initial Condition input signal of the Integrator block with the Constant value parameter or Initial value parameter of the Constant block or IC block, respectively.

Compatibility Considerations

If the data type for the output port of the Constant or IC blocks does not match the data type of the Initial Condition input signal for the Integrator block, Simulink software returns an error at compile time.

Usability Enhancements

Model Advisor

Model Advisor has been enhanced to navigate checks, display status, and report results. Also, this release contains a new Model Advisor Checks reference.

Alignment Commands

This release contains new block alignment, distribution, and resize commands to align groups of blocks along their edges, equalize interblock spacing, and resize blocks to be all the same size. See Aligning, Distributing, and Resizing Groups of Blocks Automatically in Simulink User's Guide for more information.

S-Functions

New S-Function APIs to Support Singleton Dimension Handling

New Level-2 M-File S-Function Example

This release includes a new Level-2 M-file S-function example in sfundemos.mdl. The Simulink model msfcndemo_varpulse.mdlmsfcndemo_varpulse.mdl uses the S-function msfcn_varpulse.m to create a variable-width pulse generator.

R2007a+

Bug Fixes

R2007a

New Features, Bug Fixes, Compatibility Considerations

Multidimensional Signals

This release includes support for multidimensional signals, including:

  • Sourcing of multidimensional signals

  • Logging or displaying of multidimensional signals

  • Large-scale modeling applications, such as those from model referencing

  • Buses and nonvirtual buses

  • Code generation with Real-Time Workshop software

  • S-functions, including Level-2 M-File S-functions

  • Stateflow charts

For further details, see:

Simulink software supports signals with up to 32 dimensions. Do not use signals with more than 32 dimensions.

Multidimensional Signals in Simulink Blocks

The following blocks were updated to support multidimensional signals. See Signal Dimensions in the Simulink documentation for further details.

The Block Support Table does not list which blocks support multidimensional signals. To see if a block supports multidimensional signals, check for the entry Multidimensionalized in the Characteristics table of a block.

Multidimensional Signals in S-Functions

To use multidimensional signals in S-functions, you must use the new SimStruct function, ssAllowSignalsWithMoreThan2D.

Multidimensional Signals in Level-2 M-File S-Functions

To use multidimensional signals in Level-2 M-file S-functions, you must set the new Simulink.MSFcnRunTimeBlock property, AllowSignalsWithMoreThan2D.

New Block Parameters

This release introduces the following common block parameters.

  • PreCopyFcn: Allows you to assign a function to call before the block is copied. See Block Callback Parameters in the Simulink documentation for details.

  • PreDeleteFcn: Allows you to assign a function to call before the block is deleted. See Block Callback Parameters in the Simulink documentation for details.

  • StaticLinkStatus: Allows you to obtain the link status of a block without updating out-of-date reference blocks See Checking and Setting Link Status Programmatically in the Simulink documentation for details.

GNU Compiler Upgrade

This release upgrades the GNU® compiler to GCC 4.0.3 on Mac platforms and GCC 4.1.1 on Linux platforms. The Fortran runtime libraries for the previous GCC 3.x versions are no longer included with MATLAB.

Compatibility Considerations

C, C++, or Fortran MEX-files built with the previous 3.x version of the GCC compiler are not guaranteed to load in this release. Rebuild the source code for these S-functions using the new version of the GCC compiler.

Changes to Concatenate Block

This release includes the following changes to the Concatenate block:

  • Its Mode parameter provides two settings, namely, Vector and Multidimensional array.

  • Its parameter dialog box contains a new option, Concatenate dimension, specifying the output dimension along which to concatenate the input arrays.

  • The block displays a new icon when its Mode parameter is set to Multidimensional array.

This release updates Concatenate blocks when loading models created in previous releases.

Changes to Assignment Block

This release includes the following changes to the Assignment block:

  • Enter the number of dimensions in the Number of output dimensions parameter, then configure the input and output with the Index Option, Index, and Output Size parameters.

  • The parameter dialog box has the following new parameters:

    • Number of output dimensions

    • Index Option

    • Index

    • Output Size

  • The Initialize output (Y) parameter replaces Output (Y) and has renamed options.

  • The Action if any output element is not assigned parameter replaces Diagnostic if not all required dimensions populated.

  • The block displays a new icon depending on the value of Number of input dimensions and the Index Option settings.

The following parameters are obsolete:

  • Input type

  • Use index as start value

  • Source of element indices

  • Elements

  • Source of row indices

  • Rows

  • Source of column indices

  • Columns

  • Output dimensions

This release updates Assignment blocks when loading models created in previous releases.

Changes to Selector Block

This release includes the following changes to the Selector block:

  • Enter the number of dimensions in the Number of input dimensions parameter, then configure the input and output with the Index Option, Index, and Output Size parameters.

  • The parameter dialog box has the following new parameters:

    • Number of input dimensions

    • Index Option

    • Index

    • Output Size

  • The behavior of the Sample time parameter has changed. See the Selector block Sample time parameter for details.

  • The block displays a new icon depending on the value of Number of input dimensions and the Index Option settings.

The following parameters are obsolete:

  • Input type

  • Use index as starting value

  • Source of row indices

  • Rows

  • Source of column indices

  • Columns

  • Output port dimensions

This release updates Selector blocks when loading models created in previous releases.

Improved Model Advisor Navigation and Display

This release improves the Model Advisor graphical user interface (GUI) for navigating lists of checks and viewing the status of completed checks. While Model Advisor functionality and content are largely unchanged from R2006b, the Model Advisor checks display and are navigated differently than in previous versions, and the generated Model Advisor report, if requested, displays in a MATLAB web browser window that is separate from the Model Advisor GUI.

To exercise the new features, open Model Advisor for a model (for example, enter modeladvisor('vdp')modeladvisor('vdp') at the MATLAB command line) and then follow the instructions in the Model Advisor window. For more information about Model Advisor navigation and display, see Consulting the Model Advisor in the Simulink documentation.

Change to Simulink.ModelAdvisor.getModelAdvisor Method

In this release, when using the getModelAdvisor method defined by the Simulink.ModelAdvisor class to change Model Advisor working scope to a different model, you must either close the previous model or invoke the getModelAdvisor method with 'new' as the second argument. For example, if you previously set scope to modelX with

Obj = Simulink.ModelAdvisor.getModelAdvisor('modelX');

and you want to change scope to modelY, you must either close modelX or use

Obj = Simulink.ModelAdvisor.getModelAdvisor('modelY', 'new');

If you try to change scope between models without the 'new' argument, an error message is displayed.

Compatibility Considerations

In previous releases, you could change Model Advisor working scope without closing the current session. This is no longer allowed.

If your code contains a code pattern such as the following,

Obj = Simulink.ModelAdvisor.getModelAdvisor('modelX');
...
Obj = Simulink.ModelAdvisor.getModelAdvisor('modelY');

you must add the 'new' argument to the second and subsequent invocations of getModeladvisor. For example:

Obj = Simulink.ModelAdvisor.getModelAdvisor('modelX');
...
Obj = Simulink.ModelAdvisor.getModelAdvisor('modelY', 'new');

Alternatively, you can close ModelX before issuing Simulink.ModelAdvisor.getModelAdvisor('modelY').

New Simulink Blocks

This release introduces the following blocks:

  • The Permute Dimensions block enables you to rearrange the dimensions of a multidimensional signal.

  • The Squeeze block enables you to remove singleton dimensions from a multidimensional signal.

Change to Level-2 MATLAB S-Function Block

If a model includes a Level-2 MATLAB S-Function block, and an error occurs in the S-function, the Level-2 M-File S-Function block will display M-file stack trace information for the error in a dialog box. Click OK to remove the dialog box. In previous releases, this block did not display the stack trace information.

Model Dependency Analysis

The model dependencies manifest tools identify files required by your model. You can list required files in a 'manifest' file, package the model with required files into a ZIP file, or compare two file manifests.

See Model Dependencies for more information.

Model File Monitoring

  • Warnings if a model file is changed on disk by another user or application while the model is loaded in Simulink software. (see Model File Change Notification in Managing Model Versions).

  • Warning to notify the user if multiple models or libraries with the same name exist, as Simulink software may not be using the one the user expects. (see Shadowed Files).

Legacy Code Tool Enhancements

  • New fields in the Legacy Code Tool data structure: InitializeConditionsFcnSpec and SampleTime. InitializeConditionsFcnSpec defines a function specification for a reentrant function that the S-function calls to initialize and reset states. SampleTime allows you to specify whether sample time is inherited from the source block, represented as a tunable parameter, or fixed.

  • Support for state (persistent memory) arguments in registered function specifications.

  • Support for complex numbers specified for input, output, and parameter arguments in function specifications. This support is limited to use with Simulink built-in data types.

  • Support for multidimensional arrays specified for input and output arguments in function specifications. Previously, multidimensional array support applied to parameters only.

  • Ability to apply the size function to any dimension of function input data—input, output, parameter, or state. The data type of the size function's return value can be any type except complex, bus, or fixed-point.

  • A new Legacy Code Tool option, 'backward_compatibility', which you can specify with the legacy_code function. This option enables Legacy Code Tool syntax, as made available from MATLAB Central in releases prior to R2006b, for a given MATLAB session.

  • The following new demos:

    sldemo_lct_sampletimesldemo_lct_sampletime
    sldemo_lct_worksldemo_lct_work
    sldemo_lct_cplxgainsldemo_lct_cplxgain
    sldemo_lct_ndarraysldemo_lct_ndarray

For more information, see

Compatibility Considerations

If you are using a version of the Legacy Code Tool that was accessible from MATLAB Central before R2006b, the syntax for using the tool differs from the syntax currently supported by Simulink software. To continue using the old style syntax, for example, legacy_code_initialize.m, issue the following call to legacy_code for a given MATLAB session:

legacy_code('backward_compatibility');

Continuous State Names

State names can now be assigned in those blocks that employ continuous states. The names are assigned with the ContinuousStateAttributes Block-Specific Parameters parameter, or in the Blocks Parameter dialog box.

The following blocks support continuous state names:

  • Integrator

  • State-Space

  • Transfer Fcn

  • Variable Transport Delay

  • Zero-Pole

Logging of continuous states is illustrated in the sldemo_hydrodsldemo_hydrod demo.

Changes to Embedded MATLAB Function Block

This release introduces the following changes to the Embedded MATLAB Function block:

New Function Checks M-Code for Compliance with Embedded MATLAB Subset

Embedded MATLAB function blocks introduce a new function, Embedded MATLAB MEX (emlmex), that checks M-code for compliance with the syntax and semantics of the Embedded MATLAB subset. You can add Embedded MATLAB-compliant code to Embedded MATLAB Function blocks and Truth Table blocks in Simulink models. For more information, see "Working with Embedded MATLAB MEX" in the Embedded MATLAB documentation.

Support for Multidimensional Arrays

Embedded MATLAB Function blocks now support multidimensional signals and parameter data, where the number of dimensions can be greater than 2. This feature is fully integrated with support for multidimensional signals in Simulink software. Supported functions in the Embedded MATLAB Run-Time Function Library have been enhanced to handle multidimensional data.

Support for Function Handles

Embedded MATLAB Function blocks now support function handles for invoking functions indirectly and parameterizing operations that you repeat frequently in your code. For more information, see the section on using function handles in About Code Generation from MATLAB Algorithms in the Embedded MATLAB documentation.

Enhanced Support for Frames

Embedded MATLAB Function blocks can now input and output frame-based signals directly in Simulink models. You no longer need to attach Frame Conversion blocks to inputs and outputs to achieve this functionality. See Working with Frame-Based Signals in the Simulink documentation.

New Embedded MATLAB Runtime Library Functions

Embedded MATLAB Function blocks provide 31 new runtime library functions in the following categories:

See the Embedded MATLAB Run-Time Function Library for a list of all supported functions.

Casting Functions

Derivative and Integral Functions

Discrete Math Functions

Exponential Functions

Filtering and Convolution Functions

Logical Operator Functions

Matrix and Array Functions

Polynomial Functions

Set Functions

Specialized Math

Statistical Functions

Using & and | Operators in Embedded MATLAB Function Blocks

Embedded MATLAB Function blocks no longer support & and | operators in if and while conditional statements.

Compatibility Considerations

In prior releases, these operators compiled without error, but their short-circuiting behavior was not implemented correctly. Substitute && and || operators instead.

Calling get Function from Embedded MATLAB Function Blocks

Embedded MATLAB Function blocks now support the Simulink Fixed Point get function for returning the properties of fi objects.

Compatibility Considerations

To get properties of non-fixed-point objects in Embedded MATLAB Function blocks, you must first declare get to be an extrinsic function; otherwise, your code will error. For more information refer to Calling MATLAB Functions in the Embedded MATLAB documentation.

Documentation on Embedded MATLAB Subset has Moved

Documentation on the Embedded MATLAB subset and its syntax, semantics, and supported functions has moved out of the Simulink Reference. See Code Generation from MATLAB User's Guide for the new Embedded MATLAB documentation.

Referenced Models Support Non-Zero Start Time

The simulation start time of all models in a model reference hierarchy was previously required to be 0. Now the simulation start time can be nonzero. The start time of all models in a model reference hierarchy must be the same. See Referencing a Model and Specifying a Simulation Start and Stop Time for information about these capabilities. See Referencing Configuration Sets for information about a convenient way to give all models in a hierarchy the same configuration parameters, including simulation start time.

New Functions Copy a Model to a Subsystem or Subsystem to Model

Two new functions exist that you can use to copy contents between a block diagram and a subsystem.

Simulink.BlockDiagram.copyContentsToSubSystem

Copies the contents of a block diagram to an empty subsystem.

Simulink.SubSystem.copyContentsToBlockDiagram

Copies the contents of a subsystem to an empty block diagram.

For details, see the reference documentation for each function.

New Functions Empty a Model or Subsystem

Two new functions exist that you can use to delete the contents of a block diagram or subsystem.

Simulink.BlockDiagram.deleteContents

Deletes the contents of a block diagram.

Simulink.SubSystem.deleteContents

Deletes the contents of a subsystem.

For details, see the reference documentation for each function.

Default for Signal Resolution Parameter Has Changed

In the Configuration Parameters dialog, Diagnostics > Data Validity pane, the default setting for Signal resolution is now Explicit only. Previously, the default was Explicit and warn implicit. Equivalently, the default value of the SignalResolutionControl parameter is now UseLocalSettings (previously TryResolveAllWithWarnings). See Diagnostics Pane: Data Validity for more information.

Compatibility Considerations

Due to this change, labeling a signal is no longer enough to cause it to resolve by default to a signal object. You must also do one of the following:

  • In the signal's Signal Properties dialog, select Signal name must resolve to Simulink data object and specify a Simulink.Signal object in the Signal name field. Simulink software then resolves that signal to that signal object.

  • In the Configuration Parameters dialog, set Diagnostics > Data Validity > Signal resolution to Explicit and warn implicit (to post warnings) or Explicit and implicit (to suppress warnings). Simulink software then resolves all labeled signals to signal objects by matching their names, posting a warning of each resolution if so directed.

Models built in R2007a will default to Explicit only. Models created in previous versions will retain the Signal resolution value with which they were saved, and will run as they did before. New models may therefore behave differently from existing models that retain the previous default behavior. To specify the previous default behavior in a new model, change Signal resolution to Explicit and warn implicit.

Conversion Function

MathWorks discourages using implicit signal resolution except for fast prototyping, because implicit resolution slows performance, complicates model validation, and can have nondeterministic effects. Simulink software provides the disableimplicitsignalresolution function, which you can use to change settings throughout a model so that it does not use implicit signal resolution. See the function's reference documentation, or type:

help disableimplicitsignalresolution

in the MATLAB Command Window.

Referencing Configuration Sets

This release provides configuration references (Simulink.ConfigSetRef class), which you can use to link multiple models to a configuration set stored on the base workspace. All of those models then share the same configuration set, and therefore have the same configuration parameter values. Changing a parameter value in a shared configuration set changes that value for every model that uses the set. With configuration references, you can:

  • Assign the same configuration set to any number of models

  • Replace the configuration sets of any number of models without changing the model files

  • Use different configuration sets for a referenced model in different contexts without changing the model file

Compatibility Considerations

You cannot change configuration parameter values by operating directly on a configuration reference as you can a configuration set. Instead, you must use the configuration reference to retrieve the configuration set and operate on the set. If you reconfigure a model to access configuration parameters using a configuration reference, you must update any scripts that change parameter values to incorporate the extra step of obtaining the configuration set from the reference before changing the values. See Create a Freestanding Configuration Set at the Command Line for details.

New Block, Model Advisor Check, and Utility Function for Bus to Vector Conversion

When the diagnostic Configuration Parameters > Connectivity > Buses > Bus signal treated as vector is disabled or none, you can input a homogeneous virtual bus to many blocks that accept vectors but are not formally defined as accepting buses. Simulink software transparently converts the bus to a vector, allowing the block to accept the bus.

However, MathWorks discourages intermixing buses and vectors, because such mixtures cause ambiguities that preclude strong type checking. The practice may become unsupported at some future time, and should not be used in new applications.

Simulink software provides diagnostics that report cases where buses are mixed with vectors, and includes capabilities that you can use to upgrade a model to eliminate such mixtures, as described in the following sections of the Simulink documentation:

Enhanced Support for Tunable Parameters in Expressions

Expressions that index into tunable parameters, such as P(1)+P(2)/P(i), retain their tunability in generated code, including simulation code that is generated for a referenced model. Both the indexed parameter and the index itself can be tuned.

Parameter expressions of the form P(i) retain their tunability if all of the following are true:

  • The index i is a constant or variable of double datatype

  • P is a 1D array, or a 2D array with one row or one column, of double datatype

  • P does not resolve to a mask parameter, but to a variable in the model or the base workspace

New Loss of Tunability Diagnostic

Previously, any loss of tunability generated a warning. In R2007a, you can use the Loss of Tunability diagnostic to control whether loss of tunability is ignored or generates a warning or error. See Detect loss of tunability for details.

Port Parameter Evaluation Has Changed

Previously, resolution of port parameters of a masked subsystem began within the subsystem, which could violate the integrity of the mask. For example, if a subsystem mask defines parameter A, and a port of the subsystem uses A to set some port attribute, resolving A by starting within the masked block makes A externally visible, though it should be visible only within the mask.

To fix this problem, in R2007a masked subsystem port parameter resolution starts in the containing system rather than within the masked subsystem, then proceeds hierarchically upward as it did before. This change preserves the integrity of the masked subsystem, but can change model behavior if any subsystem port previously depended for resolution on a variable defined within the mask.

Compatibility Considerations

A model whose ports did not reference variables defined within a mask are unaffected. A model that resolved any port parameter by accessing a variable within a masked block may behave differently or become vulnerable to future changes in behavior, as follows:

  • If the port parameter's value cannot be evaluated, because the evaluation would require access to a variable defined only within the mask, an error occurs.

  • If an appropriate variable exists outside the mask but has a different value than the corresponding variable within the mask, no error occurs, but model behavior may change.

  • If an appropriate variable exists and has the same value inside and outside the mask, no behavioral change occurs, but later changes to the variable outside the mask may have unexpected effects.

To ensure correct results, change the model as needed so that any port parameter that previously depended on any variables defined within a mask give the intended results using the new resolution search path.

Data Type Objects Can Be Passed Via Mask Parameters

Previously, if a masked subsystem contained a block that needed to specify a data type using a data type object, the block could access the object only in the base workspace. The data type object could not be passed into the subsystem through a mask parameter. Parameterizing data types used by blocks under a mask was therefore not possible.

To support parameterized data types inside masked subsystems, you can now use a mask parameter to pass a data type object into a subsystem. Blocks in the subsystem can then use the object to specify data types under the mask.

Expanded Options for Displaying Subsystem Port Labels

This release provides an expanded set of options for displaying port labels on a subsystem block. The options include displaying:

  • The label on the corresponding port block

  • The name of the corresponding port block

  • The name of the signal connected to the corresponding block

See the documentation for the Show Port Labels option on the Subsystem block's parameter dialog box for more information.

Model Explorer Customization Option Displays Properties of Selected Object

This release introduces a Selection Properties node to the Model Explorer's Customize Contents pane. The node allows you to customize the Model Explorer's Contents pane to display only the properties of the currently selected object. See The Model Explorer: Overview for more information.

Change to PaperPositionMode Parameter

In this release, when exporting a diagram as a graphic with the PaperPositionMode model parameter set to auto, Simulink software sizes the exported graphic to be the same size as the diagram's image on the screen when viewed at normal size. When PaperPositionMode is set to manual, Simulink software sizes the exported image to have the height and width specified by the model's PaperPosition parameter.

Compatibility Considerations

In previous releases, a model's PaperPosition parameter determined the size of the exported graphic regardless of the setting of the model's PaperPositionMode parameter. To reproduce the behavior of previous releases, set the PaperPositionMode parameter to manual.

New Simulink.Bus.objectToCell Function

A new function, Simulink.Bus.objectToCell, is available for converting bus objects to a cell array that contains bus information. For details, see the description of Simulink.Bus.objectToCell.

Simulink.Bus.save Function Enhanced To Allow Suppression of Bus Object Creation

The Simulink.Bus.save function has been enhanced such that when using the 'cell' format you have the option of suppressing the creation of bus objects when the saved M-file executes. To suppress bus object creation, specify the optional argument 'false' when you execute the saved M-file.

For more detail, see the description of Simulink.Bus.save.

Change in Version 6.5 (R2006b) Introduced Incompatibility

A change introduced in Version 6.5 (R2006b) introduces an incompatibility between this release and releases preceding Version 6.5 (R2006b). See Attempting to Reference a Symbol in an Uninitialized Mask Workspace Generates an Error for more information.

Nonverbose Output During Code Generation

Simulink Accelerator now defaults to nonverbose output when generating code. A new parameter, AccelVerboseBuild, has been added to control how much information is displayed. See Customizing the Build Process for more information.

SimulationMode Removed From Configuration Set

Previously, the SimulationMode property was attached to the configuration set for a model. In R2007a, the property has been removed from the configuration set. Now you set the simulation mode for the model using the Simulation menu in the model window or the set_param function with the SimulationMode model parameter.

Compatibility Considerations

Using Simulink.ConfigSet.SimulationMode is not recommended. Use set_param(modelName,'SimulationMode',value) instead.

R2006b

New Features, Bug Fixes, Compatibility Considerations

Model Dependency Viewer

The Model Dependency Viewer displays a dependency view of a model that shows models and block libraries directly or indirectly referenced by the model. The dependency view allows you to quickly determine your model's dependencies on referenced models and block libraries. See Model Dependencies for more information.

Enhanced Lookup Table Blocks

This release replaces the PreLookup Index Search and Interpolation (n-D) Using PreLookup blocks with two new blocks: Prelookup and Interpolation Using Prelookup. The new blocks provide fixed-point arithmetic, consistency checking, more efficient code generation, and other enhancements over the blocks they replace.

Compatibility Considerations

MathWorks plans on obsoleting the PreLookup Index Search and Interpolation (n-D) Using PreLookup blocks in a future release. In the meantime, MathWorks will continue to support and enhance these blocks. For example, this release improves the precision with which the PreLookup Index Search block computes its fraction value if its Index search method parameter specifies Evenly Spaced Points.

We recommend that you use the Prelookup and Interpolation Using Prelookup blocks for all new model development.

Legacy Code Tool

The Legacy Code Tool generates an S-function from existing C code and specifications that you supply. It enables you to transform your C functions into C MEX S-functions for inclusion in a Simulink model. See Integrating Existing C Functions into Simulink Models with the Legacy Code Tool in Developing S-Functions for more information.

Simulink Software Now Uses Internal MATLAB Functions for Math Operations

In previous releases, Simulink software used the host compiler's C++ Math Library functions to perform most mathematical operations on floating-point data. Some of those functions produced results that were slightly inconsistent with MATLAB results. In this release, Simulink software calls the same internal routines that MATLAB calls for most trigonometric, exponential, and rounding and remainder operations involving floating-point data. This ensures that when Simulink and MATLAB products operate on the same platform, they produce the same numerical results.

In particular, Simulink software now performs mathematical operations with the same internal functions that MATLAB uses to implement the following M-functions:

  • sin, cos, tan

  • asin, acos, atan, atan2

  • sinh, cosh, tanh

  • asinh, acosh, atanh

  • log, log2, log10

  • mod, rem

  • power

    Note:   By default, in this release Real-Time Workshop software continues to use C Math Library functions in the code that it generates from a Simulink model.

Enhanced Integer Support in Math Function Block

The sqrt operation in the Math Function block now supports built-in integer data types.

Configuration Set Updates

This release includes the following changes to model configuration parameters and configuration sets.

  • This release includes a new command, openDialog, that displays the Configuration Parameters dialog box for a specified configuration set. This command allows display of configuration sets that are not attached to any model.

  • The attachConfigSet command now includes an allowRename option that determines how the command handles naming conflicts when attaching a configuration set to a model.

  • This release includes a new attachConfigSetCopy command that attaches a copy of a specified configuration set to a model.

  • The new Sample hit time adjusting diagnostic controls whether Simulink software notifies you when the solver has to adjust a sample time specified by your model to solve the model. The associated model parameter is TimeAdjustmentMsg.

  • The default value of the Multitask data store diagnostic has changed from Warning to Error for new models. This change does not affect existing models.

  • The name of the Block reduction optimization parameter has changed to Block reduction.

Command to Initiate Data Logging During Simulation

The command

set_param(bdroot, 'SimulationCommand', 'WriteDataLogs')

writes all logging variables during simulation. See Exporting Signal Data Using Signal Logging for more information.

Commands for Obtaining Model and Subsystem Checksums

This release includes commands for obtaining model and subsystem checksums.

Sample Hit Time Adjusting Diagnostic

The Sample hit time adjusting diagnostic controls whether Simulink software notifies you when the solver has to adjust a sample time specified by your model to solve the model. The associated model parameter is TimeAdjustmentMsg.

Function-Call Models Can Now Run Without Being Referenced

This release allows you to simulate a function-call model, i.e., a model that contains a root-level function-call trigger block, without having to reference the model. In previous releases, the function-call model had to be referenced by another model in order to be simulated.

Signal Builder Supports Printing of Signal Groups

This release adds printing options to the Signal Builder block's editor. It allows you to print waveforms displayed in the editor to a printer, file, the clipboard, or a figure window. For details, see Printing, Exporting, and Copying Waveforms.

Method for Comparing Simulink Data Objects

This release introduces an isContentEqual method for Simulink data objects that allows you to determine whether a Simulink data object has the same property values as another Simulink data object. For more information, see Comparing Data Objects.

Unified Font Preferences Dialog Box

In this release, the Simulink Preferences dialog box displays font settings for blocks, lines, and annotations on a single pane instead of on separate tabbed panes as in previous releases. This simplifies selection of font preferences.

Limitation on Number of Referenced Models Eliminated for Single References

In previous releases, all distinct models referenced in a model hierarchy counted against the limitation imposed by Microsoft Windows on the number of distinct referenced models that can occur in a hierarchy. In this release, models configured to be instantiable only once do not account against this limit. This means that a model hierarchy can reference any number of distinct models on Windows platforms as long as they are referenced only once and are configured to be instantiable only once (see Model Referencing Limitations for more information).

Parameter Objects Can Now Be Used to Specify Model Configuration Parameters

This release allows you to use Simulink.Parameter objects to specify model configuration as well as block parameters. For example, you can specify a model's fixed step size as Ts and its stop time as 20*Ts where Ts is a workspace variable that references a parameter object. When compiling a model, Simulink software replaces a reference to a parameter object in a model configuration parameter expression with the object's value.

Compatibility Considerations

In previous releases, you could use expressions of the form p.Value(), where p references a parameter object, in model configuration parameter expressions. Such expressions cause expression evaluation errors in this release when you compile a model. You should replace such expressions with a simple reference to the parameter object itself, i.e., replace p.Value() with p.

Parameter Pooling Is Now Always Enabled

In previous releases, the Parameter Pooling optimization was optional and was enabled by default. Due to internal improvements, disabling Parameter Pooling would no longer be useful in any context. The optimization is therefore part of standard R2006b operation, and has been removed from the user interface.

Compatibility Considerations

Upgrading a model to R2006b inherently provides the effect that enabling Parameter Pooling did in previous releases. No compatibility considerations result from this change. If the optimization was disabled in an existing model, a warning is generated when the model is first upgraded to R2006b. This warning requires no action and can be ignored.

Attempting to Reference a Symbol in an Uninitialized Mask Workspace Generates an Error

In this release, attempting to reference an symbol in an uninitialized mask workspace generates an error. This can happen, for example, if a masked subsystem's initialization code attempts to set a parameter of a block that resides in a masked subsystem in the subsystem being initialized and one or more of the block's parameters reference variables defined by the mask of the subsystem in which it resides (see Initialization Command Limitations for more information).

Compatibility Considerations

In this release, updating or simulating models created in previous releases may generate unresolvable symbol error messages. This can happen if the model contains masked subsystems whose initialization code sets parameters on blocks residing in lower-level masked subsystems residing in the top-level masked subsystem. To eliminate these errors, change the initialization code to avoid the use of set_param commands to set parameters in lower-level masked subsystems. Instead, use mask variables in upper-level masked subsystems to specify the values of parameters of blocks residing in lower-level masked subsystems. See Defining Mask Parameters for information on using mask variables to specify block parameter values.

Changes to Integrator Block's Level Reset Options

This release changes the behavior of the level reset option of the Integrator block. In releases before Simulink 6.3, the level reset option resets the integrator's state if the reset signal is nonzero or changes from nonzero in the previous time step to zero in the current time step. In Simulink 6.3, 6.4, and 6.4.1, the option resets the integrator only if the reset signal is nonzero. This release restores the level reset behavior of releases that preceded Simulink 6.3. It also adds a level hold option that behaves like the level reset option of Simulink 6.3, 6.4, and 6.4.1.

Compatibility Considerations

A model that uses the level reset option could produce results that differ in this release from those produced in Simulink 6.3, 6.4, and 6.4.1. To reproduce the results of previous releases, change the model to use the new level hold option instead.

Embedded MATLAB Function Block Features and Changes

Support for Structures

You can now define structures as inputs, outputs, local, and persistent variables in Embedded MATLAB Function blocks. With support for structures, Embedded MATLAB Function blocks give you the ability to read and write Simulink bus signals at inputs and outputs of Embedded MATLAB Function blocks. See "Using Structures" in the Embedded MATLAB documentation.

Embedded MATLAB Editor Analyzes Code with M-Lint

The Embedded MATLAB Editor uses the MATLAB M-Lint Code Analyzer to automatically check your Embedded MATLAB function code for errors and recommend corrections. The editor displays an M-Lint bar that highlights offending lines of code and displays Embedded MATLAB diagnostics as well as MATLAB messages. See "Using M-Lint with Embedded MATLAB" in the Embedded MATLAB documentation.

New Embedded MATLAB Runtime Library Functions

Embedded MATLAB Function blocks provide 36 new runtime library functions in the following categories:

Data Analysis

Discrete Math

Exponential

Interpolation and Computational Geometry

Linear Algebra

Logical

Specialized Plotting

Transforms

Trigonometric

New Requirement for Calling MATLAB Functions from Embedded MATLAB Function Blocks

To call external MATLAB functions from Embedded MATLAB Function blocks, you must first declare the functions to be extrinsic. (External MATLAB functions are functions that have not been implemented in the Embedded MATLAB runtime library.) MATLAB Function blocks do not compile or generate code for extrinsic functions; instead, they send the function to MATLAB for execution during simulation. There are two ways to call MATLAB functions as extrinsic functions in Embedded MATLAB Function blocks:

  • Use the new construct eml.extrinsic to declare the function extrinsic

  • Call the function using feval

For details, see Calling MATLAB Functions in the Embedded MATLAB documentation.

Compatibility Considerations

Currently, Embedded MATLAB Function blocks use implicit rules to handle calls to external functions:

  • For simulation, Embedded MATLAB Function blocks send the function to MATLAB for execution

  • For code generation, Embedded MATLAB Function blocks check whether the function affects the output of the Embedded MATLAB function in which it is called. If there is no effect on output, Embedded MATLAB Function blocks proceed with code generation, but exclude the function call from the generated code. Otherwise, Embedded MATLAB Function blocks generate a compiler error.

In future releases, Embedded MATLAB Function blocks will apply these rules only to external functions that you call as extrinsic functions. Otherwise, they will compile external functions by default, potentially causing unpredictable behavior or generating errors. For reliable simulation and code generation, MathWorks recommends that you call external MATLAB functions as extrinsic functions.

Type and Size Mismatch of Values Returned from MATLAB Functions Generates Error

Embedded MATLAB Function blocks now generate an error if the type and size of a value returned by a MATLAB function does not match the predeclared type and size.

Compatibility Considerations

In previous releases, Embedded MATLAB Function blocks attempted to silently convert values returned by MATLAB functions to predeclared data type and sizes if a mismatch occurred. Now, such mismatches always generate an error, as in this example:

x = int8(zeros(3,3)); % Predeclaration
x = eval('5'); % Calls MATLAB function eval

This code now generates an error because the Embedded MATLAB function predeclares x as a 3–by-3 matrix, but MATLAB function returns x as a scalar double. To avoid errors, reconcile predeclared data types and sizes with the actual types and sizes returned by MATLAB function calls in your Embedded MATLAB Function blocks.

Embedded MATLAB Function Blocks Cannot Output Character Data

Embedded MATLAB Function blocks now generate an error if any of its outputs is character data.

Compatibility Considerations

In the previous release, Embedded MATLAB Function blocks silently cast character array outputs to int8 scalar arrays. This behavior does not match MATLAB, which represents characters in 16–bit unicode.

R2006a+

No New Features or Changes

R2006a

New Features, Compatibility Considerations

Signal Object Initialization

This release introduces the use of signal objects to specify initial values for signals and states. This allows you to initialize signals or states in the model, not just those generated by blocks that have initial condition or value parameters. For details, see Using Signal Objects to Initialize Signals and Discrete States .

Icon Shape Property for Logical Operator Block

The Logical Operator block's parameter dialog box contains a new property, Icon shape, settings for which can be either rectangular or distinctive. If you select rectangular (the default), the block appears as it does in previous releases. If you select distinctive, the block appears as the IEEE® standard graphic symbol for the selected logic operator.

Data Type Property of Parameter Objects Now Settable

This release allows you to set the data type of a Simulink.Parameter object via either its Value property or via its Data type property. In previous releases, you could specify the data type of a parameter object only by setting the object's Value property to a typed value expression.

Range-Checking for Parameter and Signal Object Values

This release introduces range checking for Simulink.Parameter and Simulink.Signal objects. Simulink software checks whether a parameter's Value or a signal's Initial value falls within the values you specify for the object's Minimum and Maximum properties. If not, Simulink software generates a warning or error.

Compatibility Considerations

Previous releases ignored such violations since the Minimum and Maximum properties were intended for use in documenting parameter and signal objects. In this release, Simulink software displays a warning if you load a parameter object or a signal object does not specify a valid range or its value falls outside the specified range. If you get such a warning, change the parameter or signal object's Value or Minimum or Maximum values so that the Value falls within a valid range.

Expanded Menu Customization

The previous release of Simulink software allows you to customize the Simulink editor's Tools menu. This release goes a step further and allows you to customize any Simulink (or Stateflow) editor menu (see Customizing the Simulink User Interface ).

Bringing the MATLAB Desktop Forward

The Model Editor's View menu includes a new command, MATLAB Desktop, that brings the MATLAB desktop to the front of the windows displayed on your screen.

Converting Atomic Subsystems to Model References

This release adds a command, Convert to Model Block, to the context (right-click) menu of an atomic subsystem. Selecting this command converts an atomic subsystem to a model reference . See Atomic Subsystem and Converting a Subsystem to a Referenced Model for more information.

The function sl_convert_to_model_reference, which provided some of the same capabilities as Convert to Model Block, is obsolete and has been removed from the documentation. The function continues to work, so no incompatibility arises, but it posts a warning when called. The function will be removed in a future release.

Concatenate Block

The new Concatenate block concatenates its input signals to create a single output signal whose elements occupy contiguous locations in memory. The block typically uses less memory than the Matrix Concatenation block that it replaces, thereby reducing model memory requirements.

Compatibility Considerations

This release replaces obsolete Matrix Concatenation blocks with Concatenate blocks when loading models created in previous releases.

Model Advisor Changes

Model Advisor Tasks Introduced

This release introduces Model Advisor tasks for referencing models and upgrading a model to the current version of Simulink software. See Consulting the Model Advisor for more information.

Model Advisor API

This release introduces an application program interface (API) that enables you to run the Model Advisor from the MATLAB command line or from M-file programs. For example, you can use the API to create M-file programs that determine whether a model passes selected Model Advisor checks whenever you open, simulate, or generate code from the model. See Running the Model Advisor Programmatically for more information.

Built-in Block's Initial Appearance Reflects Parameter Settings

In this release, when you load a model containing nonmasked, built-in blocks whose appearance depends on their parameter settings, such as the Selector block, the appearance of the blocks reflect their parameter settings. You no longer have to update the model to update the appearance of such blocks.

Compatibility Considerations

In previous releases, model or block callback functions that use set_param to set a built-in, nonmasked block's parameters could silently put the block in an unusable state. In this release, such callbacks will trigger error messages if they put blocks in an unusable state.

Double-Click Model Block to Open Referenced Model

In this release, double-clicking a Model block that specifies a valid referenced model opens the referenced model, rather than the Block Parameters dialog box as in previous releases. To open the Block Parameters dialog box, choose Model Reference Parameters from the Context or Edit menu. See Navigating a Model Block for details.

Signal Logs Reflect Bus Hierarchy

In this release, signal logs containing buses reflect the structure of the buses themselves instead of flattening bus data as in previous releases (see Simulink.TsArray).

Tiled Printing

This release introduces a tiled printing option that allows you to distribute a block diagram over multiple pages. You can control the number of pages over which Simulink software distributes the block diagram, and hence, the total size of the printed image. See Tiled Printing for more information.

Solver Diagnostic Controls

In this release, the Configuration Parameters dialog box includes the following enhancements:

  • The Diagnostics pane contains a new diagnostic, Consecutive zero crossings violation, that alerts you if Simulink software detects the maximum number of consecutive zero crossings allowed. You can specify the criteria that Simulink software uses to trigger this diagnostic using two new Solver diagnostic controls on the Solver pane:

    • Consecutive zero crossings relative tolerance

    • Number of consecutive zero crossings allowed

    For more information, see Preventing Excessive Zero Crossings .

  • The Solver pane contains a new solver diagnostic control, Number of consecutive min step size violations allowed, that Simulink software uses to trigger the Min step size violation diagnostic (see Number of consecutive min steps).

Diagnostic Added for Multitasking Conditionally Executed Subsystems

This release adds a sample-time diagnostic that detects an enabled subsystem in multitasking solver mode that operates at multiple rates or a conditionally executed subsystem that contain an asynchronous subsystem. Such subsystems can cause corrupted data or non-deterministic behavior in a real-time system using code generated from the model. See the documentation for the Multitask Conditionally Executed Subsystem diagnostic for more information.

Embedded MATLAB Function Block Features and Changes

Option to Disable Saturation on Integer Overflow

The properties dialog for Embedded MATLAB Function blocks provides a new Saturate on Integer Overflow check box that lets you disable saturation on integer overflow to generate more efficient code. When you enable saturation on integer overflow, Embedded MATLAB Function blocks add additional checks in the generated code to detect integer overflow or underflow. Therefore, it is more efficient to disable this option if your algorithm does not rely on overflow behavior. For more information, see MATLAB Function Block Properties .

Nontunable Option Allows Use of Parameters in Constant Expressions

The Data properties dialog for the MATLAB Function (formally called Embedded MATLAB Function) block provides a new Tunable check box that lets you specify the tunability (see Tunable Parameters ) of a workspace variable or mask parameter used as data in Embedded MATLAB code. The option is checked by default. Unchecking the option allows you to use a workspace variable or mask parameter as data wherever Embedded MATLAB requires a constant expression, such as a dimension argument to the zeros function. For more information, see Adding Data to a MATLAB Function Block .

Enhanced Support for Fixed-Point Arithmetic

Embedded MATLAB Function blocks support the new fixed-point features introduced in Version 1.4 (R2006a) of the Fixed-Point Toolbox software, including [Slope Bias] scaling (see Specifying Simulink Fixed Point Data Properties ). For information about the features added to the Simulink Fixed Point software, see Fixed-Point Toolbox Release Notes.

Support for Integer Division

Embedded MATLAB Function blocks support the new MATLAB function idivide, which performs integer division with a variety of rounding options. It is recommended that the rounding option used for integer division in Embedded MATLAB Function blocks match the rounding option in the parent Simulink model.

The default rounding option for idivide is 'fix', which rounds toward zero. This option corresponds to the choice Zero in the submenu for Signed integer division rounds to:, a parameter that you can set in the Hardware Implementation Pane of the Configuration Parameters dialog in Simulink software (see Hardware Implementation Pane in the online Simulink documentation). If this parameter is set to Floor in the Simulink model that contains the Embedded MATLAB Function block, it is recommended that you pass the rounding option 'floor' to idivide in the block.

For a complete list of Embedded MATLAB runtime library functions provided in this release, see New Embedded MATLAB Runtime Library Functions.

Setting FIMATH Cast Before Sum to False No Longer Supported in Embedded MATLAB Function Blocks

You can no longer set the FIMATH property CastBeforeSum to false for fixed-point data in Embedded MATLAB Function blocks.

Compatibility Considerations

The reason for the restriction is that Embedded MATLAB Function blocks do not produce the same numerical results as MATLAB when CastBeforeSum is false. In the previous release, Embedded MATLAB Function blocks set CastBeforeSum to false by default for the default FIMATH object. If you have existing models that contain Embedded MATLAB Function blocks in which CastBeforeSum is false, you will get an error when you compile or update your model. To correct the issue, you must set CastBeforeSum to true. To automate this process, you can run the utility slupdate either from the Model Advisor or by typing the following command at the MATLAB command line:

slupdate ('modelname')

where 'modelname' is the name of the model containing the Embedded MATLAB Function block that generates the error. slupdate prompts you to update this property by selecting one of these options:

OptionAction
YesUpdates the first occurrence of CastBeforeSum=false in Embedded MATLAB Function blocks in the offending model and then prompts you for each subsequent one found in the model.
NoDoes not update any occurrences of CastBeforeSum=false in the offending model.
AllUpdates all occurrences of CastBeforeSum=false in the offending model.

    Note   slupdate detects CastBeforeSum=false only in default FIMATH objects defined for Simulink software signals in Embedded MATLAB Function blocks. If you modified the FIMATH object in an Embedded MATLAB Function block, update CastBeforeSum manually in your model and fix the errors as they are reported.

Type Mismatch of Scalar Output Data in Embedded MATLAB Function Blocks Generates Error

Embedded MATLAB Function blocks now generate an error if the output type inferred by the block does not match the type you explicitly set for a scalar output.

Compatibility Considerations

In previous releases, a silent cast was inserted from the computed type to the set type when mismatches occurred. In most cases, you should not need to set the output type for Embedded MATLAB Function blocks. When you do, insert an explicit cast in your Embedded MATLAB script. For example, suppose you declare a scalar output y to be of type int8, but its actual type is double. Replace y with a temporary variable t in your script and then add the following code:

y = int8(t);

Implicit Parameter Type Conversions No Longer Supported in Embedded MATLAB Function Blocks

Embedded MATLAB Function blocks now generate an error if the type of a parameter inferred by the block does not match the type you explicitly set for the parameter.

Compatibility Considerations

In the previous release, if the type you set for a parameter did not match the actual parameter value, Embedded MATLAB Function blocks implicitly cast the parameter to the specified type. Now you receive a compile-time error when type mismatches occur for parameters defined in Embedded MATLAB Function blocks.

There are two workarounds:

  • Change the scope of the data from Parameter to Input. Then, connect to the input port a Constant block that brings in the parameter and casts it to the desired type.

  • Cast the parameter inside your Embedded MATLAB function to the desired type.

Fixed-Point Parameters Not Supported

Embedded MATLAB Function blocks generate a compile-time error if you try to bring a fi object defined in the base workspace into Embedded MATLAB Function blocks as a parameter.

There are two workarounds:

  • Change the scope of the data from Parameter to Input. Then, connect to the input port a Constant block that brings in the parameter and casts it to fixed-point type.

  • Cast the parameter inside your Embedded MATLAB function to fixed-point type.

Embedded MATLAB Function Blocks Require C Compiler for Windows 64

No C compiler ships with MATLAB and Simulink products on Windows 64. Because Embedded MATLAB Function blocks perform simulation through code generation, you must supply your own MEX-supported C compiler to use these blocks. The C compilers available at the time of this writing for Windows 64 include Microsoft Visual Studio® 2005 and the Microsoft Platform SDK.

R14SP3

New Features, Compatibility Considerations

Model Referencing

Function-Call Models

This release allows you to use a block capable of emitting a function-call signal, such as a Function-Call Generator or a custom S-function, in one model to control execution of another model during the current time step. See Function-Call Subsystems for more information.

Using Noninlined S-Functions in Referenced Models

This release adds limited support for use of noninlined S-functions in models referenced by other models. For example, you can simulate a model that references models containing noninlined S-functions. However, you cannot use Real-Time Workshop software to generate a standalone executable (Real-Time Workshop target) for the model. See Model Referencing Limitations in the Simulink documentation for information on other limitations.

Referenced Models Without Root I/O Can Inherit Sample Times

Previous releases of Simulink software do not allow referenced models without root-level input or output ports to inherit their sample time. This release removes this restriction.

Referenced Models Can Use Variable Step Solvers

Previous releases of Simulink software do not allow models to reference models that require variable-step solvers. This release removes this restriction.

Model Dependency Graphs Accessible from the Tools Menu

This release adds a Model Reference Dependency Graph item to the Model Editor's Tools menu. The item displays a graph of the models referenced by the model displayed in the Model Editor. You can open any model in the dependency graph by clicking its node. See Viewing a Model Reference Hierarchy for more information.

Command That Converts Atomic Subsystems to Model References

This release introduces a MATLAB command that converts an atomic subsystem to a model reference. See Simulink.SubSystem.convertToModelReference for more information.

Model Reference Demos

This release has the following model reference demo changes:

  • Model reference demo names are now prepended with sldemo_. For example, the demo mdlref_basic.mdl is now sldemo_mdlref_basic.mdl.

  • You can no longer use the mdlrefdemos command from the MATLAB command prompt to access model reference demos. Instead, you can navigate to the Simulink demos tab either though the Help browser, or by typing demos at the command prompt, then navigating to the Simulink demos category and browsing the demos.

Block Enhancements

Variable Transport Delay, Variable Time Delay Blocks

This release replaces the Variable Transport Delay block of previous releases with two new blocks. The Variable Transport Delay block of previous releases implemented a variable time delay behavior, which is now implemented by the Variable Time Delay block introduced in this release. This release changes the behavior of the Variable Transport Delay block to model variable transport delay behavior, e.g., the behavior of a fluid flowing through a pipe.

Additional Reset Trigger for Discrete-Time Integrator Block

This release adds a sampled level trigger option for causing the Discrete-Time Integrator to reset. The new reset trigger is more efficient than the level reset option, but may introduce a discontinuity when integration resumes.

    Note:   In Simulink 6.2 and 6.2.1, the level reset option behaves like the sampled level option in this release. This release restores the level reset option to its original behavior.

Input Port Latching Enhancements

This release includes the following enhancements to the signal latching capabilities of the Inport block.

Label Clarified for Triggered Subsystem Latch Option

The dialog box for an Inport block contains a check box to latch the signal connected to the system via the port. This check box applies only to triggered subsystems and hence is enabled only when the Inport block resides in a triggered subsystem. In this release, the label for the check box that selects this option has changed from Latch (buffer) input to Latch input by delaying outside signal. This change is intended to make it clear what the option does, i.e., cause the subsystem to see the input signal's value at the previous time step when the subsystem executes at the current time step (equivalent to inserting a Memory block at the input outside the subsystem). The Inport block's icon displays <Lo> to indicate that this option is selected.

Latch Option Added for Function-Call Subsystems

This release adds a check box labeled Latch input by copying inside signal to the Inport block's dialog box. This option applies only to function-call subsystems and hence is enabled only if the Inport block resides in a function-call subsystem. Selecting this option causes Simulink software to copy the signal output by the block into a buffer before executing the contents of the subsystem and to use this copy as the block's output during execution of the subsystem. This ensures that the subsystem's inputs, including those generated by the subsystem's context, will not change during execution of the subsystem. The Inport block's icon displays <Li> to indicate that this option is selected.

Improved Function-Call Inputs Warning Label

In previous releases, the dialog box for a function-call subsystem contains a check box labeled Warn if function-call inputs arise inside called context. This release changes the label to Warn if function-call inputs are context-specific. This change is intended to indicate more clearly the warning's purpose, i.e., to alert you that some or all of the function-call inputs come from the function-call subsystem's context and hence could change while the function-call subsystem is executing.

Parameter Object Expressions No Longer Supported in Dialog Boxes

Compatibility Considerations

Previous releases allow you to specify a Simulink.Parameter object as the value of a block parameter by entering an expression that returns a parameter object in the parameter's value field in the block's parameter dialog box. In this release, you must enter the name of a variable that references the object in the MATLAB or model workspace.

Modeling Enhancements

Annotations

This release introduces the following enhancements to model annotations:

Custom Signal Viewers and Generators

This release allows you to add custom signal viewers and generators so that you can manage them in the Signal & Scope Manager. See Visualizing and Comparing Simulation Results for further details.

Model Explorer Search Option

This release adds an Evaluate Property Values During Search option to the Model Explorer. This option applies only for searches by property value. If enabled, the option causes the Model Explorer to evaluate the value of each property as a MATLAB expression and compare the result to the search value. If disabled (the default), the Model Explorer compares the unevaluated property value to the search value.

Using Signal Objects to Assign Signal Properties

Previous releases allow you to use signal objects to check signal property values assigned by signal sources. This release allows you, in addition, to use signal objects to assign values to properties not set by signal sources. See Simulink.Signal for more information.

Bus Utility Functions

This release introduces the following bus utility functions:

Fixed-Point Support in Embedded MATLAB Function Blocks

In this release, the Embedded MATLAB Function block supports manyFixed-Point Toolbox functions. This allows you to generate code from models that contain fixed-point MATLAB functions. For more information, see Code Acceleration and Code Generation from MATLAB for Fixed-Point Algorithms in the Fixed-Point Toolbox documentation.

    Note:   You must have a Simulink Fixed Point license to use this capability.

Embedded MATLAB Function Editor

The Embedded MATLAB Editor has a new tool, the Ports and Data Manager. This tool helps you manage your block inputs, outputs, and parameters. The Ports and Data Manager uses the same Model Explorer dialogs for manipulating data, but restricts the view to the block you are working on. You can still access the Model Explorer via a menu item to get the same functionality as in previous releases.

Input Trigger and Function-Call Output Support in Embedded MATLAB Function Blocks

Embedded MATLAB Function blocks now supports input triggers and function-call outputs. See Ports and Data Manager for more information.

Find Options Added to the Data Object Wizard

This release adds find options to the Data Object Wizard. The options enable you to restrict the search for model data to specific kinds of objects. See Data Object Wizard for more information.

Fixed-Point Functions No Longer Supported for Use in Signal Objects

Compatibility Considerations

Previous releases allowed you to use fixed-point data type functions, such as sfix, to specify the value of the DataType property of a Simulink.Signal object. This release allows you to use only built-in data types and Simulink.NumericType objects to specify the data types of Simulink.Signal objects. See the Simulink.Signal documentation for more information.

Simulation Enhancements

Viewing Logged Signal Data

This release can display logged signal data in the MATLAB Times Series Tools viewer on demand or whenever a simulation ends or you pause a simulation. See "Viewing Logged Signal Data" in the Simulink documentation for more information.

Importing Time-Series Data

In this release, root-level Inport blocks can import data from time-series (see Simulink.Timeseries) and time-series array (see Simulink.TSArray) objects residing in the MATLAB workspace. See Importing MATLAB timeseries Data for more information. From Workspace blocks can also import time-series objects. The ability to import time-series objects allows you to use data logged from one simulation as input to another simulation.

Using a Variable-Step Solver with Rate Transition Blocks

Previous releases of Simulink software generate an error if you try to use a variable-step solver to solve a model that contains Rate Transition blocks. This release allows you to use variable-step as well as fixed-step solvers to simulate a model. Note that you cannot generate code from a model that uses a variable-step solver. However, you may find it advantageous, in some cases, to use a variable-step solver to test aspects of the model not directly related to code generation. This enhancement allows you to switch back and forth between the two types of solver without having to remove and reinsert Rate Transition blocks.

Data Integrity Diagnostics Pane Renamed, Reorganized

This release changes the name of the Data Integrity diagnostics pane of the Configuration Parameters dialog box to the Data Validity pane. It also reorganizes the pane into groups of related diagnostics. See Diagnostics Pane: Data Validity for more information.

Improved Sample-Time Independence Error Messages

When you enable the Ensure sample time independent solver constraint (see Periodic sample time constraint for more information), Simulink software generates several error messages if the model is not sample-time independent. In previous releases, these messages were not specific enough for you to determine why a model failed to be sample-time independent. In this release, the messages point to the specific block, signal object, or model parameter that causes the model not to be sample-time independent.

User Interface Enhancements

Model Viewing

This release adds the following model viewing enhancements:

Customizing the Simulink User Interface

This release allows you to use M-code to perform the following customizations of the standard Simulink user interface:

MEX-Files

MEX-Files on Windows Systems

In this release, the extension for files created by the MATLAB mex command on Windows systems has changed from dll to mexw32 or mexw64.

Compatibility Considerations

If you have implemented any S-functions in C, Ada, or Fortran or have models that reference other models, you should

  • Recreate any mexopts.bat files (other than the one in your MATLAB preferences directory) that you use to build S-functions and model reference simulation targets

  • Rebuild your S-functions

MEX-File Extension Changed

In this release, the extension for files created by the MATLAB mex command has changed from dll to mexw32 (and mexw64).

Compatibility Considerations

If you use a mexopts.bat file other than the one created by the mex command in your MATLAB preferences directory to build Accelerator targets, you should recreate the file from the mexopts.bat template that comes with this release.

R14SP2

New Features, Compatibility Considerations

Multiple Signals on Single Set of Axes

Viewers can now display multiple signals on a single set of axes.

Logging Signals to the MATLAB Workspace

Viewers can now log the signals that they display to the MATLAB base workspace. See Exporting Signal Data Using Signal Logging for more information.

Legends that Identify Signal Traces

Viewers can now display a legend that identifies signal traces.

Displaying Tic Labels

Viewers can now display tic labels both inside and outside scope axes.

Opening Parameters Dialog Box

You can open a viewer's parameters dialog box by right-clicking on the viewer scope.

Rootlevel Input Ports

Compatibility Considerations

If you save a model with rootlevel input ports in this release and load it in a previous release, you will get the following warning:

Warning: model, line xxx block_diagram does not have a parameter 
named 'SignalName'.

You can safely ignore this warning.

Compatibility Summary

ReleaseFeatures or Changes with Compatibility Considerations
R2011a
R2010bSP2None
R2010bSP1None
R2010b
R2010a
R2009bSP1None
R2009b
R2009a
R2008b
R2008a
R2007b
R2007a+None
R2007a
R2006b
R2006a+None
R2006a
R14SP3
R14SP2Rootlevel Input Ports
Was this topic helpful?