Documentation

Simulink Release Notes

R2016a

New Features, Bug Fixes, Compatibility Considerations

Simulation Analysis and Performance

Automatic Solver Option: Set up and simulate your model more quickly with automatically selected solver settings

Starting with R2015b, you can use the auto solver to select a solver and step size for simulating a model. The auto solver suggests a fixed-step or variable-step solver along with maximum step size based on the dynamics of the model. Select the auto solver in the solver pane and accept recommended settings in the solver information dialog box. For more information, see Use Auto Solver to Select a Solver.

Starting with R2016a, auto solver calculates the stiffness of a model. For stiff models, auto solver selects ode15s. For more information, see Auto Solver Heuristics.

One-Click Display: Click a signal line when the simulation is running to view the current value

When you simulate your model, you can now display the port value label for a signal by clicking it. This option is selected by default.

For more information, see Display Value for a Specific Port or watch this video to learn more.

Simulation Metadata Diagnostics: Understand why a simulation has stopped in batch or individual runs

You can now use diagnostics in SimulationMetadata to understand why a simulation stopped. The metadata object has a new property called ExecutionInfo. This property contains information about stop events, error, and warning diagnostics. You can use the information in ExecutionInfo to troubleshoot individual runs or each run in a batch simulation.

See Simulink.SimulationMetadata to learn more.

Multi-Input Root Inport Mapping: Connect multiple sets of input signals to your Simulink model for interactive or batch simulation

The Root Inport Mapping tool now supports the connection of multiple sets of input signals to your Simulink® model for interactive or batch simulation.

For more information, see Map Root Inport Signal Data or watch this video to learn more.

Simulation for Mixed Targets: Simulate system-level designs that integrate referenced models targeting an assembly of heterogeneous embedded devices

You can simulate a parent system model that includes referenced models configured for heterogeneous embedded devices. For example, you can simulate a parent model that has a referenced model Configuration Parameters > Hardware Implementation > Device vendor parameter set to ARM Compatible and another referenced model with that parameter set to ASIC/FPGA. Simulink models can now simulate system engineering level models that target multiple hardware devices.

Time Out feature for Performance Advisor run time

You can now specify a run-time duration for Performance Advisor by selecting the Time Out option. For models with long simulation times, use this option to limit the time period for Performance Advisor runs. For more information, see Specify Runtime for Performance Advisor.

Solver Profiler to speed up simulation performance

You can use Solver Profiler to examine solver behavior of variable step solvers and model behavior to identify issues that can contribute to poor simulation performance. Run Solver Profiler on models that fail to simulate or that have long simulation times. When you pause or stop the simulation, Solver Profiler displays information gathered during runtime including an analysis of conditions that can slow down simulation. Use this data to examine the model simulation for solver resets, zero crossings and solver exceptions.

Solver Profiler highlights states in the model that contain solver errors. You can also launch States Explorer from Profiler to further investigate the state plot of a model state.

Diagnostic Viewer performance improvement

The Diagnostic Viewer performs better and faster when handling large number of similar warnings from Simulink operations.

Component-Based Modeling

Variant Source and Sink Blocks with Condition Propagation: Design variant choices and automatically remove unneeded functionality based on block connectivity

Simulink provides two blocks to visualize implementations of variant choices in a model graphically—Variant Source and Variant Sink.

When you compile the model, Simulink determines which variant control evaluates to true. Simulink then deactivates blocks that are not tied to the variant control being true and visualizes the active connections.

When you specify variant conditions in models containing Variant Source and Variant Sink blocks, Simulink propagates these conditions backward and forward from these blocks to determine which components of the model are active during simulation.

Scoping Simulink Functions: Call Simulink Function blocks within a subsystem hierarchy

Defining the scope of Simulink functions in a Simulink model allows you to modularize your model by limiting the visibility and access of functions. Simulink uses subsystems to define the local scope of a function. See Define Scope of Simulink Function Blocks and Simulink Functions in Simulink Models, or watch this video to learn more.

Simulink Units: Specify, visualize, and check consistency of units on interfaces

Simulink now supports the specification of physical units as part of signal attributes. This capability enables you to specify unit attributes at the boundaries of components such as subsystems and models. To learn more, see Unit Specification in Simulink Models or watch this video.

For a list of supported unit systems and their units, see Allowed Unit Systems.

Units in Simulink.Parameter and Simulink.Signal Objects

The DocUnits property is now Units. Use this property to specify units for signals.

    Note:   You can still continue to use the DocUnits field to access or set the property. This capability maintains backward compatibility for existing MATLAB® code, MAT-files, and Simulink data dictionaries that use the DocUnits field.

Specifying units in MATLAB Function blocks

Simulink supports the specification of a unit property for data inputs and outputs of MATLAB Function blocks. Specify units for input and output data by using the Unit (e.g., m, m/s^2, N*m) parameter on the Ports and Data Manager.

During model update, Simulink checks for inconsistencies in units between input and output data ports and the corresponding Simulink signals.

Units for logging and loading signal data

You can include units in signal data that you log or load.

Units for logging and loading are specified using Simulink.SimulationData.Unit objects. When you log using Dataset or Timeseries format, Simulink stores the unit information using Simulink.SimulationData.Unit objects. If you create MATLAB timeseries data to load, you can specify Simulink.SimulationData.Unit object for the Units property of the timeseries object.

For details, see Log Signal Data That Uses Units and Load Signal Data That Uses Units.

New units blocks

The following blocks are new:

Configuration parameters

The following configuration parameters are new, available on the All Parameters tab:

Updated example

The Exploring the Solver Jacobian Structure of a Model has been updated with unit specifications in all components.

Compatibility Considerations

  • The DocUnits property is now Unit for Simulink.Parameter or Simulink.Signal objects. If, in a previous release, you used the DocUnits parameter of a Simulink.Parameter or Simulink.Signal object to contain text that does not now comply with units specifications, simulation returns a warning when the model simulates.

    To suppress these warnings, set the configuration parameter Unitsinconsistency messages to none. This setting suppresses all units inconsistency check warnings.

  • If you have a class that derives from Simulink.Parameter, Simulink.Signal, or Simulink.BusElement with a previously defined Unit property, Simulink returns an error like the following:

    ​Cannot define property 'Unit' in class 'classname' because the property
    has already been defined in the superclass 'superclass'.

    If you use this property to represent the physical unit of the signal, delete the Unit property from the derived class in the R2016a or later release. Existing scripts continue to work, unless you are assigning incorrectly formed unit expressions to the Unit field. In this case, replace the use of Unit with DocUnits to continue to be able to assign the unit expression.

      Note:   If you store existing data in a MAT- or .sldd file, in a release prior to R2016a, copy the contents of the Unit property to the DocUnits first. Then, save the file in the earlier release before loading the model in R2016a or later release.

Mask Dialogs: Create masks with flexible layout options and new control parameters

You can use these controls from the Mask Editor dialog box to create a rich mask dialog box:

  • Collapsible panel: Expand or collapse sections in the mask dialog box.

  • Dynamic mask dialogs: Change the menu options of a dependent dialog box based on the value of the controlling parameter.

  • Spinbox step size: Fine-tune and control a parameter value in the mask dialog box.

  • Horizontal stretch property: Create a more flexible mask dialog box layout.

  • Slider and dial parameter: Use variables to specify value in dial and slider parameters.

For more information, see Mask Editor Overview.

Mask Images: Quickly add images to masks and while keeping the port names visible

  • Mask icons can leave port names visible.

  • Mask icon preview is available in the Mask Editor.

For more information, see Mask Editor Overview.

Tracing Simulink Functions: Display connections between all Function Callers and a Simulink Function

Visually display connections between Simulink functions and their callers with tracing lines that connect callers to functions:

  • Turning on/off tracing lines — From the Display menu, select Function Connectors.

  • Direction of tracing lines — Lines connected at the bottom of a block are from a function caller. Lines connected at the top of a block are to a Simulink function or a subsystem containing the function.

  • Navigation to functions — If a function caller is within a subsystem, you can open the subsystem, and then click a link to the called Simulink function. If the function is at the root level of a model, the function opens. If the function is within a subsystem, the subsystem containing the function opens.

Signal Label Propagation for Referenced Models: Propagate signal labels out of referenced models by default

To propagate signal labels out of referenced models more easily, in R2016a for new models, the Configuration Parameters > Data Model Referencing > Propagate all signal labels out of the model parameter is now enabled by default. The default for the PropagateSignalLabelsOutOfModel parameter is now 'on'. For details, see Propagate all signal labels out of the model.

Compatibility Considerations

If you open a model created before R2016a that has the Propagate all signal labels out of the model parameter cleared, that setting is preserved.

The new default can require updates to scripts written before R2016a that rely on the previous default PropagateSignalLabelsOutOfModel setting of 'off'. To have the scripts work as expected with models created in R2016a or later, update the code to reflect that the default for that parameter is now 'on'.

Simulink.SubSystem.convertToModelReference function for multiple subsystem conversion: Convert multiple subsystems with one command

You can convert multiple subsystems in a model to referenced models in one Simulink.SubSystem.convertToModelReference command.

Subsystem to Model Reference Conversion: Insert subsystem wrapper to preserve model layout

When you convert a subsystem to a referenced model, you can have the conversion process insert a wrapper subsystem to preserve the layout of a model. The subsystem wrapper contains the Model block from the conversion.

In the Model Reference Conversion Advisor, enable the Create a wrapper subsystem input parameter. In the Simulink.SubSystem.convertToModelReference function, use the CreateWrapperSubsystem name and value pair.

Model Reference Conversion Automatic Fix for Goto Blocks: Convert subsystems with Goto blocks more easily

The Model Reference Conversion Advisor and the Simulink.SubSystem.convertToModelReference function include additional checks and automatic fixes to make it easier to convert subsystems with Goto blocks to referenced models.

Virtual Bus Signals Across Model Reference Boundaries: Use virtual bus signals as inputs or outputs of a referenced model

In R2016a, when you specify that a bus signal input or output for a referenced model is a virtual bus, Simulink sets up the model so that, compared to previous releases, generated code generally:

  • Has fewer copies of bus signals

  • Executes faster

Use the Block Parameters dialog box for an Inport or Outport block to specify virtual bus output.

  • Inport block — Clear the Output as virtual bus parameter.

  • Outport block — Clear the Output as virtual bus in parent model parameter.

For information about the changes to the code that you generate from models, see Model Block Virtual Buses: Interface to Model blocks by using virtual buses, reducing data copies in the generated code.

Compatibility Considerations

The behavior of models that meet these criteria is different than it is in R2016a:

  • The model was saved in a release earlier than R2016a.

  • The model has referenced models with bus inputs and outputs configured to be treated as virtual buses.

Use the Upgrade Advisor Check virtual bus across model reference boundaries check to avoid errors that the new behavior can trigger. Run the Analyze model hierarchy and continue upgrade sequence check on the top-level model and then down through the model reference hierarchy.

Bus Selector and Bus Assignment Block Signals: Display full signal path while editing a model

You can now display full paths to bus signals for Bus Selector and Bus Assignment blocks in the Simulink Editor, without opening the Block Parameters dialog boxes for the blocks. Interactively viewing the full signal path can simplify the process of editing signals with duplicate leaf names, by eliminating the need to match the block ports with the associated signals. Also, interactively viewing the full path for the signal provides a quick way to get context for understanding the model.

  • To see the full path of a Bus Selector block output signal, hover over the output signal label.

  • To see the full path of up to the first ten output signals of a Bus Selector block, hover over the block.

  • To see the full path of up to the first ten signals in a Bus Assignment block, hover over the block.

Multi-Input Bus-Capable Block Ports: Simulate unconnected multi-input bus-capable block ports without error

Before R2016a, simulating a model that contains a multiport bus-capable block with an unconnected input port causes an error if one or more of the input ports is connected directly to either:

  • A bus signal

  • A Ground block

In R2016a, you can simulate under the same circumstances without error for these multiport bus-capable blocks:

  • Manual Switch

  • Multiport Switch

  • S-Function

  • Switch

  • Variant Source

  • Vector Concatenate

Using a Merge block in Simplified initialization mode in still causes an error for those situations.

Outport Blocks with Bus Output: Simulate Outport blocks with a bus output without error

Before R2016a, simulating a model that contains an Outport block whose output data type is specified by a bus object caused an error if either of these conditions applied:

  • The Outport block has an unconnected port.

  • The Outport block is connected directly to a Ground block.

In R2016a, you can simulate without error in these situations.

Function-Call Split block with multiple outputs

Before R2016a, the Function-Call Split block was a circular block with one input and two outputs. In R2016a, this block can split an incoming function-call signal into more than two output signals. You can also change the shape of the block.

Function-Call Split block with no input signal

Before R2016a, the Function-Call Split block had to have an input signal. In R2016a, you can simulate your model without supplying an input signal to the Function-Call Split block.

Trigger port with inherited periodic function-call signal

Before R2016a, if the Trigger block of a triggered subsystem had the Trigger type parameter set to function-call and Sample time type set to periodic, you could not set Sample time to -1. In R2016a, you can specify a sample time of -1.

Standalone code generation for models with asynchronous function-call inputs

Before R2016a, you had to build a top model from which to reference asynchronous function-call inputs. In R2016a, models with asynchronous function-call inputs support code generation on standalone models. You can now build these models as is.

Additional component parameters saved with Simulink.ConfigSet.saveAs

In R2016a, the Simulink.ConfigSet.saveAs function saves all enabled parameters in the base configuration set. In addition, the function saves enabled parameters for the following components:

  • Coder Target

  • HDL Coder™

  • Polyspace®

  • SimEvents®

  • Simscape™

  • Simulink Coverage

  • Simulink Design Verifier™

  • Simulink PLC Coder™

  • Target Hardware Resources

Project and File Management

Start Page: Get started or resume work faster by accessing templates, recent models, and featured examples

The Simulink start page helps you get started faster by offering model and project templates and examples. You can use common design patterns or learn about new features.

If you want to pick up where you left off, the start page shows a list of recent models, and opens the project automatically if your selected model is part of a project. You can now also open recent models from the Simulink Editor or from the Library Browser.

For details, see Create Models and Open Existing Models, or watch this video to learn more.

Compatibility Considerations

In previous releases, you could not access a list of recent models, and you could not find model and project templates and examples in the same place. The Simulink Template Gallery and the project template browser are merged into the start page.

Functionality What Happens When You Use This Functionality? Compatibility Considerations
simulinkOpens the start page

simulink no longer opens the Library Browser, but instead opens the start page.

To open the Library Browser, use slLibraryBrowser instead, or click the Library Browser button in the Editor: .

Simulink button on the MATLAB Home tab.
Opens the start pageThe Simulink button in MATLAB no longer opens the Library Browser, but instead opens the start page.
Creating a new model, chart, library, or project from the MATLAB Home tab New menu, from the Editor, from the Library Browser, or from Simulink Project.Opens the start page

Choose a template from the start page. The start page shows an appropriate filtered list of models, charts, libraries, or projects.

To recreate the previous workflow:

  • In the start page, select Blank Model, Blank Library, Blank Project, or Chart, (or press Ctrl+N for a blank model),

  • In the Editor or Library Browser, select a new Blank Model (or press Ctrl+N).

To create a project using source control or from an archive, use the start page options.

Use model templates.Find all your templates on the start page.The menu item From Template is no longer in the Editor or Library Browser. Instead, in the Simulink Editor, select File > New > Model and select your template in the start page. In the Library Browser, click the New Model button arrow and select Model. The Simulink Template Gallery is now merged into the start page.
Use project templates.Find all your templates on the start page.Project templates are no longer in the MATLAB Home tab New menu or in the Create Project dialog box. Instead, open the start page from MATLAB, or from the Editor by selecting File > New > Project, and select your template in the start page.
Simulink project templates created in R2014a or earlier (.zip files)You cannot browse to legacy templates in the start pageUpgrade legacy templates to .sltx files using Simulink.exportToTemplate.

Automatic Renaming: Update all references in a project when you rename models, libraries, or MATLAB files

In a Simulink project, when you rename, delete, or remove a file, the project checks for impact in other project files. You can find and fix impacts such as changed library links, model references, and model callbacks. This tooling can help you avoid refactoring pain tracking down other affected files. Automatic renaming is helpful in preventing errors that result if you change names or paths manually and overlook or mistype one or more instances of the name.

Automatic renaming helps you refactor MATLAB code. Simulink project dependency analysis now finds dependencies on MATLAB code in packaged functions, classes, and superclasses. You can view the dependencies in the Impact graph and if you refactor the files, automatic renaming prompts you. For example, when renaming a class, the project offers to automatically update all classes that inherit from it. If you rename a .m or .mlx file, the project offers to automatically update any files and callbacks that call it.

Three-Way Model Merge: Resolve conflicts between revisions and ancestor models using Simulink projects

In a Simulink project under source control, if your changes in a model conflict with another user, you can open the Three-Way Model Merge tool to resolve the conflicts. You can examine your local file compared to the conflicting revision and the base ancestor file, and decide which changes to keep. You can resolve the conflict and submit your changes. Three-Way Model Merge requires Simulink Report Generator™.

For details, see Resolve Conflicts.

Template API: Programmatically create models and projects from custom templates

In R2016a, you can programmatically create models and projects from templates, and create custom templates. Model and project templates are starting points to apply common modeling approaches. They help you reuse settings and block configurations and share knowledge. Use model and project templates to apply best practices and take advantage of previous modeling solutions.

Export function: Export to previous version using Simulink.exportToVersion

In R2016a you can use a new function, Simulink.exportToVersion, to export a model so that you can open it in a previous version of Simulink. The new function makes it easier to distinguish between exporting to a previous version and saving with a different name.

In previous releases you could use save_system with the 'ExportToVersion' option. This option will also continue to work.

Dirty Model Management: Identify, save, or discard unsaved changes in project models

In a Simulink project, you can check for unsaved changes in project models, and decide whether to save or discard changes. In the previous release, you had to close the project to see warnings about unsaved changes. Now you can manage unsaved changes before closing the project.

Source Control API: Programmatically get modified files and revision information

In R2016a, you can programmatically get source control status information about Simulink project files. Use simulinkproject to get a project object, then you can get a list of modified files in the project. You can get the local status of a file (modified, unmodified, not under source control) and the revision if available.

For details, see listModifiedFiles.

Source Control Notifications: List changed files on update (SVN); find out if your branch is behind the origin (Git)

In R2016a, Simulink Project provides more notifications to help you with source control operations. With SVN, when you update a project from the repository, you see a list of all changed files in a dialog box. With Git™, when you fetch from a remote repository, you can see if your current branch is behind or ahead of the remote tracking branch (the origin).

SVN Externals: Include files in projects from other repositories or repository locations

Use SVN externals to get files into your Simulink project from another repository or from a different part of the same repository. Right-click a project folder and select Manage SVN Externals. The project provides a dialog to help you browse, specify and validate the externals definitions. After you define the externals setting on a folder, other project users can get the same files included in their project.

For details, see Manage SVN Externals.

Custom Shortcut Icons: Personalize frequent task buttons on the toolstrip

In R2016a, you can specify an icon to use for your shortcut buttons on the Project Shortcuts tab. Icons such as "build" can aid other project users to recognize frequent tasks. For details, see Customize Shortcut Icons.

Simplified Configuration Parameters: Configure model more easily using streamlined category panes

In the Configuration Parameters dialog box, streamlined category panes display only configuration parameters that you are most likely to use when configuring your model.

The category panes, previously referred to as the Category view, are now available on the Commonly Used Parameters tab. The All Parameters tab, previously referred to as the List view, provides the complete list of parameters in the model configuration set.

Compatibility Considerations

Following are the configuration parameters that have moved to the All Parameters tab or moved to a different pane.

    Note:   Parameters that are removed from a pane are still available for configuration on the All Parameters tab. To locate a parameter on this tab, use either the search box or the Category filter.

Data Import/Export Pane

The Enable live streaming of selected signal to Simulation Data Inspector parameter is moved to the All Parameters tab.

The Save simulation output as single object parameter is now called Single simulation output

The following parameters are available by clicking Additional Parameters at the bottom of the pane:

  • Limit data points to last

  • Decimation

  • Output options

  • Refine factor

Diagnostics Pane

The following parameter is moved to the All Parameters tab:

  • Solver data inconsistency

Diagnostics > Data Validity Pane

The following parameters are moved to the All Parameters tab:

  • Array bounds exceeded

  • Model verification block enabling

  • Check preactivation output of execution context

  • Check runtime output of execution context

  • Check undefined subsystem initial output

  • Detect multiple driving blocks executing at the same time step

  • Underspecified initialization detection

Diagnostics > Saving Pane

The pane is removed and its parameters are moved to the All Parameters tab:

  • Block diagram contains disabled library links

  • Block diagram contains parameterized library links

Diagnostics > Solver Pane

The following parameters are moved to the Diagnostics > Sample Time pane:

  • Sample hit time adjusting

  • Unspecified inheritability of sample time

The following parameter is moved to the Diagnostics > Compatibility pane:

  • SimState object from earlier release

Optimization Pane

The following parameters are moved to the All Parameters tab:

  • Remove code from floating-point to integer conversions with saturation that maps NaN to zero

  • Compiler optimization level

  • Verbose accelerator builds

  • Implement logic signals as Boolean data (vs. double)

  • Block reduction

  • Conditional input branch execution

  • Use memset to initialize floats and doubles to 0.0

Optimization > Signals and Parameters Pane

The following parameters are moved to the All Parameters tab:

  • Signal storage reuse

  • Enable local block outputs

  • Reuse local block outputs

  • Optimize global data access

  • Reuse global block outputs

  • Eliminate superfluous local variables (Expression folding)

  • Simplify array indexing

Simulation Target Pane

The following parameters are moved to the All Parameters tab:

  • Echo expressions without semicolons

  • Simulation target build mode

  • Ensure responsiveness

  • Generate typedefs for imported bus and enumeration types

  • Ensure memory integrity

Simulation Target > Custom Code Pane

The pane is removed and its parameters are moved to the Simulation Target pane:

  • Header file

  • Initialize function

  • Source file

  • Terminate function

  • Parse custom code symbols

  • Include directories

  • Libraries

  • Source files

  • Defines

Simulation Target > Symbols Pane

The pane is removed and its parameter is moved to the Simulation Target pane:

  • Reserved names

Simulink Editor

Single-Selection Actions: Access commonly used editing actions when clicking a block or signal line

When you select a block or a signal line in a Simulink model, a cue appears that lets you select a common action to perform. When you move your cursor over the cue, an action bar appears. Click the action you want to perform.

  • For blocks, you can comment or uncomment the block or hide or display the block name using this cue.

  • For signal lines, you can autoroute the line or enable or disable signal logging.

The figure shows how to use the cue to comment out a block.

Watch this video to learn more.

Multiple-Selection Cue: Selecting multiple blocks in the Simulink Editor shows new cue

When you select multiple blocks in your model, the Simulink Editor now displays a smaller cue, as shown in the figure. Move your mouse over the cue to display the action bar of common commands.

Single Click for Quick Insert: Click block name once to insert block from list

If you know the name of the block you want to add to a model, you can click in the model where you want to add the block and start typing the block name. The blocks that match appear in a list. In previous releases, you double-clicked the block name to insert it in the model. In R2016a, you click the block name once to insert it. For an example, see Add More Blocks.

Interactive Library Unlocking: Click lock symbol in custom libraries to unlock

Clicking the lock symbol in a custom library now unlocks the library so you can edit it. For information about library locks, see Create a Custom Library.

Key Parameter Preference: Turn off parameter prompt during block creation

When you add a block to a model, a prompt appears so that you can enter a key parameter. To prevent this prompt from appearing, you can set a Simulink preference. In your model, select File > Simulink Preferences. In the Editor Preferences pane, clear the Edit key parameter when adding new blocks check box.

Improved block search usability

The Quick Block Insert search displays a description of the library making it easier to recognize the block in the Library Browser.

Data Management

Signal and State Logging to File: Log data directly to a MAT-file for long simulations

When logging large amounts of data that can cause memory issues for a long simulation, use the new Configuration Parameters > Data Import/Export > Log Dataset data to file parameter. With this feature enabled, Simulink stores in a MAT-file data that is in Dataset format for these kinds of logging:

  • Signal logging

  • States

  • Final states

  • Output

  • Data stores

Alternatively, you can enable this feature using the LoggingToFile and LoggingFileName name-value pairs with either the sim command or set_param command.

Using a Simulink.SimlationData.DatasetRef object to access signal logging and states logging data loads data into the model workspace incrementally. Loading and accessing data for other kinds of logging loads all of the data into memory at once.

Preserve symbolic constants in propagated signal dimensions

Previously, Simulink treated signal and parameter dimension specifications as numeric constants. In R2016a, you can use a Simulink.Parameter object as a symbol in a MATLAB expression to represent a dimension value. During simulation, Simulink propagates dimension symbols throughout the model and preserves these symbols in the propagated signal dimensions.

For example, Inport blocks In1 and In2 have symbolic constant dimension specifications. In the Signals Attribute tab in the Source Block Parameters dialog box for In1, the Port dimension parameter has the Simulink.Parameter A, which has a value of 2. In the Signals Attribute tab in the Source Block Parameters dialog box for In2, the Port dimension parameter has the Simulink.Parameter B, which has a value of 3. When you simulate the model, you see the symbolic constants and their values propagate throughout the model.

Embedded Coder® preserves these dimension symbols and expressions in the generated code. If you use Embedded Coder, you can compile the same generated code into multiple applications of different sizes. For more information on generating code with symbolic constants, see Compile-Time Dimensions: Generate compiler directives (#define) for implementing signal dimensions and Implement Dimension Variants for Array Sizes in Generated Code.

Dataset Format for Signal Logging: Log signals in format used for other logging

When you open a model in R2016a, signal logging uses the Dataset format for the logged data. The SignalLoggingSaveFormat parameter is set to Dataset.

Dataset is the default format for logging output and state information. Using the same format for signal logging data as well as other logged data simplifies writing scripts to process that data.

Compatibility Considerations

The ModelDataLogs class is supported for backwards compatibility. Starting in R2016a, you cannot log data in the ModelDataLogs format. In R2016a or later, when you open a model from an earlier release that had used ModelDataLogs format, the model is converted to use Dataset format.

You can convert signal logging data from ModelDataLogs to Dataset format. For more information, see Convert Logged Data to Dataset Format.

If you have legacy code that uses the Simulink.ModelDataLogs API, you can encounter situations that require updates to your code or model. See Migrate Scripts That Use ModelDataLogs API.

Unlimited Number of Data Points for Logging by Default: Log all data points by default

To simplify logging time, output, and state data, the default behavior is to have no limit on the number of data points logged during a simulation. In R2016a, by default the Configuration Parameters > All Parameters > Limit data points is now cleared.

Compatibility Considerations

The changed default can require updates to scripts written before R2016a that rely on the previous default of limiting the logged data points to 1000 or to a specified number of data points and that use:

  • The new_system function to create an empty Simulink system

  • Simulink.ConfigSet to access the model configuration set

Root Inport Mapping Tool Updates

The Root Inport Mapping Tool has the following updates:

  • New interface

  • Support for Excel® spreadsheets on all platforms

  • Support for the linking in of multiple scenario files at the same time

For more information, see Map Root Inport Signal Data

Function to convert MAT-file contents to Simulink.SimulationData.Dataset object

New convertToSlDataset function converts the contents of a MAT-file that contains Simulink inputs to a Simulink.SimulationData.Dataset object.

Functions to identify and close data dictionaries

Some commands and functions, such as Simulink.data.dictionary.cleanupWorkerCache, cannot operate when data dictionaries are open. Use the new function Simulink.data.dictionary.getOpenDictionaryPaths to identify open data dictionaries.

You can use the new function Simulink.data.dictionary.closeAll to close all connections to all open data dictionaries. However, it is a best practice to close each individual connection.

Navigation to variables from additional block dialog boxes

Beginning in R2015a, you can navigate to or create variables directly from blocks in the base Simulink libraries such as Discrete and Continuous. You can navigate to or create the variables in a workspace or data dictionary, or navigate to mask parameters, by right-clicking the variable name in the block dialog box. For more information, see Manage Variables from Block Parameter.

In R2016a, the blocks in these additional libraries allow you to navigate to variables from block dialog boxes:

  • Communications System Toolbox

  • Communications System Toolbox Support Package for RTL-SDR Radio, except for the Radio address parameter in the RTL-SDR Receiver block

  • Communications System Toolbox Support Package for Xilinx FPGA-Based Radio

  • SimEvents, except for the Port number parameter in the Conn legacy block

  • Simulink Coder

  • Simulink Control Design

  • Simulink Design Optimization

  • Simulink Design Verifier

  • Simulink Extras

  • Simulink Support Package for Apple iOS Devices

  • Simulink Support Package for BealgeBoard Hardware

  • Simulink Support Package for LEGO MINDSTORMS EV3 Hardware

  • Simulink Support Package for LEGO MINDSTORMS NXT Hardware

  • Simulink Support Package for Raspberry Pi Hardware

  • Simulink Support Package for Samsung GALAXY Android Devices

  • System Identification Toolbox

Functionality Being Removed or Changed

FunctionalityResultUse InsteadCompatibility Considerations
The programmatic parameter DefaultDataPackage, which corresponds to the Package option on the Data Management Defaults pane in the Simulink Preferences dialog box.

Warning. For example, this command generates a warning:

set_param(0,...
'DefaultDataPackage',...
'mpt')

To select default classes for creating signal and parameter objects, on the Model Explorer toolbar, click the arrows next to the Simulink Signal and Simulink Parameter buttons.

To select a default package when you apply a custom storage class in a Signal Properties dialog box or in a block dialog box, use the new drop-down list Signal object class.

In the Data Object Wizard, click Change Class to select a class for each data object that the wizard proposes.

In your scripts, remove references to the programmatic parameter DefaultDataPackage.

Connection to Hardware

Hardware implementation parameters enabled by default

In R2016a, the Enable hardware specification button is removed from the Configuration Parameters > Hardware Implementation pane. By default, the parameters on the pane are enabled.

Mac Support for LEGO EV3: Run Simulink models on LEGO EV3 hardware from a Mac

You can use the Simulink Support Package for LEGO® MINDSTORMS® EV3 Hardware on the Apple Mac OS X platform.

Block Enhancements

From Spreadsheet Block Updates

The From Spreadsheet has the following changes:

  • The block has moved from the Simulink Extras/Additional Sources sublibrary to the Simulink Sources sublibrary.

  • The block now supports Rapid Accelerator mode on all platforms.

System object enhancements to MATLAB System block

To implement these classes and methods for defining your own System objects, add them to your object's class definition file.

  • Fixed-point data tab — The showFiSettingsImpl method adds a Data Types tab to the MATLAB System block dialog box. This tab includes options for fixed-point data settings.

  • Model reference discrete sample time inheritance — The allowModelReferenceDiscreteSampleTimeInheritanceImpl method lets you specify whether a System object™ in a referenced model can inherit the sample time of the parent model. If your object uses discrete sample time in its algorithm, you set this method to true to allow inheritance.

Unit Delay block does not accept rate transitions

In R2016a, if the Unit Delay block input and output signals are at different rates, the block produces an error. For the rate transitions workflow, use a Rate Transition block.

Matrix Interpolation Block for Multidimensional Lookup Table Data

The Matrix Interpolation block performs interpolation (or extrapolation) on a multidimensional table, where each data point can be a matrix. The block resides in the Simulink Extras library.

Enhanced System Object Development with MATLAB Editor

Create System objects in the MATLAB Editor using code insertion and visualization options.

  • Define your System object with options to insert properties, methods, states, inputs, and outputs.

  • View and navigate the System object code with the Analyzer.

  • Develop System block and preview block dialog box interactively (with Simulink only).

These coding tools are available when you open an existing System object or create a new System object with New > System object.

Scope Block and Signal Viewer Enhancements

MATLAB Function Blocks

Cell Array Support: Use additional cell array features in a MATLAB Function block

In R2016a, support for cell arrays in a MATLAB Function block includes:

Use of {end + 1} to grow a cell array

You can write code such as X{end + 1} to grow a cell array X. For example:

X = {1 2};
X(end + 1} = 'a';

When you use {end + 1} to grow a cell array, follow the restrictions described in Growing a Cell Array by Using {end + 1}.

Value and handle objects in cell arrays

Cell arrays can contain value and handle objects. You can use a cell array of objects as a workaround for the limitation that code generation does not support objects in matrices or structures.

Function handles in cell arrays

Cell arrays can contain function handles.

Non-Power-of-Two FFT Support: Generate code for fast Fourier transforms for non-power-of-two transform lengths

In previous releases, code generation required a power of two transform length for fft, fft2, fftn, ifft, ifft2, and ifftn. In R2016a, code generation allows a non-power-of-two length for these functions.

Faster Standalone Code for Linear Algebra: Generate code that takes advantage of your own target-specific LAPACK library

To improve the simulation speed of MATLAB Function block algorithms that call certain linear algebra functions, the simulation software can call LAPACK functions. In R2016a, if you use Simulink Coder™ to generate C/C++ code for these algorithms, you can specify that the code generator produce LAPACK function calls. If you specify that you want to generate LAPACK function calls, and the input arrays for the linear algebra functions meet certain criteria, the code generator produces calls to relevant LAPACK functions. The code generator uses the LAPACKE C interface.

LAPACK is a software library for numerical linear algebra. MATLAB uses this library in some linear algebra functions, such as eig and svd. Simulink uses the LAPACK library that is included with MATLAB. Simulink Coder uses the LAPACK library that you specify. If you do not specify a LAPACK library, the code generator produces code for the linear algebra function instead of generating a LAPACK call.

To specify that you want to generate LAPACK function calls and link to a specific LAPACK library, see Speed Up Linear Algebra in Code Generated from a MATLAB Function Block in the Simulink Coder documentation.

Concatenation of variable-size, empty arrays

In R2016a, the MATLAB Function block treatment of an empty array in a concatenation more closely matches the MATLAB treatment.

For concatenation of arrays, MATLAB and the MATLAB Function block require that corresponding dimensions across component arrays have the same size, except for the dimension that grows. For horizontal concatenation, the second dimension grows. For vertical concatenation, the first dimension grows.

In MATLAB, when a component array is empty, the sizes of the nongrowing dimensions do not matter because MATLAB ignores empty arrays in a concatenation. In previous releases, the MATLAB Function block required that the sizes of nongrowing dimensions of an variable-size, empty array matched the sizes of the corresponding dimensions in the other component arrays. A dimension size mismatch resulted in a simulation error.

In R2016a, for most cases of empty arrays in concatenation, the MATLAB Function block behavior matches MATLAB behavior. In some cases, if the MATLAB Function block does not recognize the empty array and treats it as a variable-size array, a dimension size mismatch results in a simulation error.

Consider the function myconcat that concatenates two arrays A and B.

function D = myconcat(n, B)
%#codegen
assert(n <= 5);
A = zeros(n,3);
C = [A, B];
D = numel(C);
end

The size of A is :5-by-3. The first dimension has a variable size with an upper bound of 5. The second dimension has fixed size 3. Suppose that B is a 5-by-5 array. If n is 0, A is an empty array whose size is 0-by-3. In previous releases, myconcat in a MATLAB Function block resulted in a size mismatch error because the size of dimension 1 of A did not match the size of dimension 1 of B. In R2016a, in a MATLAB Function block, the output from myconcat is 25. This output is the same as the output from myconcat in MATLAB.

Compatibility Considerations

When the result of the concatenation is assigned to a variable that must be a fixed-size variable, support for a variable-size, empty array in a concatenation introduces an incompatibility.

In previous releases, it was possible that a concatenation that included a variable-size array produced a fixed-size array because concatenation rules were stricter in the MATLAB Function block than in MATLAB. In R2016a, a concatenation that includes a variable-size array produces a variable-size array. If the result of the concatenation is assigned to a variable that must be a fixed-size variable, an error occurs.

Consider the function myconcat1 that concatenates two arrays X and Y.

function c = myconcat1(n, Y)
%#codegen
assert(n <= 2);
X = zeros(n,2);
Z.f = [X Y];
c = numel(Z.f);

X has size :2-by-2. The first dimension has a variable size with an upper bound of 2. The second dimension has fixed size 2. Suppose that Y is a 2-by-4 array. In previous releases, the MATLAB Function block determined that the result of [X Y] had fixed size 2-by-6. In R2016a, the result of [X Y] has a size of 2-by-:6. The first dimension has a fixed size of 2 and the second dimension has a variable size with an upper bound of 6. This size accommodates an empty and nonempty X. If X is empty, the size of the result is 2-by-4. If X is nonempty, the size of the result is 2-by-6.

Consider the function myconcat2.

function c = myconcat2(n, Y)
%#codegen
assert(n <= 2);
X = zeros(n,2);
Z.f = ones(2,6);
myfcn(Z);
Z.f = [X Y];
c = numel(Z.f);

function myfcn(~)

myconcat2 assigns a 2-by-6 value to Z.f. The size of Z.f is fixed at 2-by-6 because Z is passed to myfcn. The result of the concatenation [X Y] is variable-size. The assignment Z.f = [X Y] results in an error because the left side of the assignment is fixed-size and the right side is variable-size.

To work around this incompatibility, you can use coder.varsize to declare that Z.f is variable-size.

function c = myconcat2(n, Y)
%#codegen
assert(n <= 2);
coder.varsize('Z.f');
X = zeros(n,2);
Z.f = ones(2,6);
myfcn(Z);
Z.f = [X Y];
c = numel(Z.f);

function myfcn(~)

xcorr Code Generation: Generate faster code for xcorr with long input vectors

For long input vectors, code generation for xcorr now uses a frequency-domain calculation instead of a time-domain calculation. The resulting code can be faster than in previous releases.

To use the xcorr function, you must have the Signal Processing Toolbox™ software.

More keyboard shortcuts for the MATLAB Function report

In R2016a, you can use keyboard shortcuts to perform the following actions in a MATLAB Function report.

ActionDefault Keyboard Shortcut
Zoom inCtrl+Plus
Zoom outCtrl+Minus
Evaluate selected MATLAB codeF9
Open help for selected MATLAB codeF1
Open selected MATLAB codeCtrl+D
Step backward through files that you opened in the code paneAlt+Left
Step forward through files that you opened in the code paneAlt+Right
RefreshF5
FindCtrl+F

Your MATLAB preferences define the keyboard shortcuts associated with these actions. You can also select these actions from a context menu. To open the context menu, right-click anywhere in the report.

Code generation for Audio System Toolbox functions and System objects

Code generation for additional Computer Vision System Toolbox functions and objects

See C code generation support in the Computer Vision System Toolbox™ release notes.

Image Processing Toolbox Code Generation: Generate code for additional functions

Changes to code generation support for MATLAB functions

Code generation for WLAN System Toolbox functions and System objects

Units for MATLAB Function blocks

Simulink supports the specification of a unit property for data inputs and outputs of MATLAB Function blocks. Specify units for input and output data by using the Unit (e.g., m, m/s^2, N*m) parameter on the Ports and Data Manager.

During model update, Simulink checks for inconsistencies in units between input and output data ports and the corresponding Simulink signals.

In/Out Arguments: Specify same variable name for in/out arguments

In a MATLAB Function block, you can specify the same name for input and output arguments. For example, the block supports this code.

function y = fcn(y)
%#codegen

y = y + 1;
The corresponding input and output ports on the block have the same name, y.

UserData parameter available for storing values

Use set_param() and get_param() to store and retrieve values in the UserData parameter for MATLAB Function blocks.

Modeling Guidelines

High-Integrity Systems: Model object, file, and folder names

When you develop models for high-integrity systems, use the following guidelines for model object, file, and folder names:

If you have a Simulink Verification and Validation™ license, you can use the following Model Advisor standards checks to verify compliance with high-integrity guideline hisl_0032: Model object names. The checks are available in the applicable Model Advisor By Task folder.

Model Advisor

Additional functionality for Model Advisor check that checks for usage of partial structure

In R2016a, the Model Advisor check Check for partial structure parameter usage with bus signals has a new name, Check structure parameter usage with bus signals. The check uses a new programmatic ID, mathworks.design.MismatchedBusParams.

If you have Simulink Coder software, before you generate code from a model, use this check to discover potential inefficient typecasts due to mismatched data types. For information about the changes to the check functionality, see Model Advisor check for data type mismatches between bus elements and structure fields.

Compatibility Considerations

If you have scripts that programmatically run this check, consider using the new programmatic ID. The old programmatic ID is mathworks.design.PartialBusParams. For example, your scripts might use this command:

SysResultObjArray = ModelAdvisor.run({'myModel'},{'mathworks.design.PartialBusParams'})

Your scripts continue to work with the old ID. The new ID is mathworks.design.MismatchedBusParams.

In a future release, the check will appear in the By Product > Simulink Coder folder instead of the By Product > Simulink folder. You will need Simulink Coder software to run the check. If you do not have Simulink Coder software, consider removing the check from your scripts in R2016a.

S-Functions

ssSetSolverNeedsReset updates

The ssSetSolverNeedsReset macro is now needed for both fixed-step and variable-step ODE solvers. Simulink now monitors S-function continuous state changes without solver resets in normal and accelerated simulation modes for fixed-step simulation.

To improve performance, consider updating existing S-functions that correctly use ssSetSolverNeedsReset with the new macro, ssSetSkipContStatesConsistencyCheck.

ssSetSkipContStatesConsistencyCheck

The ssSetSkipContStatesConsistencyCheck macro is a new macro that lets you skip continuous state consistency checks. Consider using this macro for an S-function with continuous states that either does not change the state vector or changes it only in conjunction with ssSetSolverNeedsReset.

R2015aSP1

Bug Fixes

R2015b

New Features, Bug Fixes, Compatibility Considerations

Simulink Editor

Signal Line Healing: Click once to repair broken signal lines after deleting blocks

You can connect signal lines that broke when you deleted a block. When you delete a block that was connected to one input signal and one output signal, a prompt appears in its place. Click the prompt to connect the broken input and output signal lines to each other.

Multilingual Names and Comments: Use any language to write block names, signal names, and MATLAB Function comments​​

You can use Unicode characters for most textual content in Simulink, including names of blocks and signals as well as comments in MATLAB scripts or functions.

Programmatic removal of mask dialog box controls and mask parameters

You can use the following functions to remove dialog control elements and parameters from the mask dialog box:

Alphabetical or model view order in Library Browser

You can choose to view blocks in the Simulink Library Browser in alphabetical order or in the order they appear in the library. Right-click in the blocks pane in the library browser, and select Sort in library model order or Sort in alphabetical order.

For more information, see Reorder Blocks in Libraries.

Prompt to set key parameter when dragging a block from the Library Browser

When you drag a block from the Library Browser into your model, you are prompted to enter the key parameter. Setting the value this way lets you set the parameter without opening the dialog box.

Printing to Postscript and EPS file formats

You now cannot print Simulink models or Stateflow® charts to postscript and EPS file formats.

Compatibility Considerations

If you want to print models or charts to a file, specify a .pdf extension for the output file.

Programmatic addition of areas and images in models

You can now add labeled areas and images to your Simulink model programmatically. For more information, see add_block.

Redesigned interface for Model Dependency Viewer

The Model Dependency Viewer tool has a new interface to view a model's dependencies on models and libraries. For more information, see Model Dependency Viewer.

Visual cue for undo and redo of block parameter value changes

After you undo or redo block parameter changes, a visual cue appears that shows the current values of the affected parameters. For example:

  1. In the vdp model, for an Integrator block, change the Initial condition parameter value to 2 and select the Wrap state check box. Apply the changes.

  2. Select Edit > Undo Parameter Changes. The cue shows that the parameters returned to their original values.

  3. Select Edit > Redo Parameter Changes. The cue shows the restored parameters values.

For more information on Undo and Redo, see Interactive Model Building.

Simulation Analysis and Performance

New Interface for Scopes: View and debug signals with cursors and measurements

The Simulink Scope and Floating Scope blocks with the Scope Viewer were significantly upgraded. Simulink upgrades the scope blocks in a model that you previously created and saved when you reopen it.

Major new features include simulation data analysis and debugging tools directly within the Scope window, and tools similar to those of modern hardware bench-top oscilloscopes. See Scope block reference for a list of features.

    Note:   The Signal Statistics, Bilevel Measurements, and Peak Finder panels require a DSP System Toolbox™ or Simscape license.

Features from the previous scope were retained with some differences.

CapabilityPrevious Simulink Scope blockNew Simulink Scope block
Number of input portsNo limitMaximum 96
Number of axes (displays)No limitMaximum 16

Mapping axes (displays) to input ports

Number of axes equal to the number of input ports.

Number of displays and number of input ports are independent.

Ports are assigned to displays sequentially, one port per display. If there are more ports than displays, the extra signals are plotted in the last display.

Mapping axes (displays) to signalsFor the Floating Scope, select a specific axis and assign signals to axis using the Signal Selector.For the Floating Scope, the number of displays and the number of attached signals are independent.

Signals are assigned to displays sequentially, one signal per display. If there are more signals than displays, the extra signals are plotted in the last display.

Default logging formatStructure with timeDataset
Default line colorColor order yellow, magenta, cyan, red, green, light gray.Color order yellow, blue, orange, green, purple, cyan, magenta.
Model Explorer SearchSearch by Property Name, by Property Value, or by Dialog Prompt.Not possible to search property names or values.

Block and dialog parameters

The command get_param(<scope block path>,'ObjectParameters') returns a list of block parameters and dialog parameters.

The command get_param(<scope block path>,'ObjectParameters') returns a list of block parameters. There are no dialog parameters.

The command get_param(<scope block path>,'DialogParameters') returns empty.

Last buffer Data Archiving

Last data buffer in external mode data archiving saved to the workspace by default

Data saved to workspace when Write Intermediate Results to WorkSpace is selected

Decimation and Sample Time

Sample time and decimation settings are not independent.

Sample time and decimation settings are independent.

Select signals for Floating Scope

Several Signal Selectors opened at once.

Selection from the model diagram and from the Signal Selector poorly coordinated.

Only one Signal Selector opened at a time.

Selecting signals with the Signal Selector disables selection from the model diagram.

To select signals from the model diagram, unlock the Floating Scope, and then select signals.

Convert Scope block to Floating Scope block and back

Convert Scope to Floating Scope using a Floating Scope check box parameter.

Conversion not available.

Get a Scope or a Floating Scope from the sinks library.

Floating propertyPossible to convert a Scope block to a Floating Scope block using the command set_param([model '/Scope'], 'Floating', 'on')The Floating property is read-only and set to 'off'. Not possible to convert a Scope to a Floating Scope.

Hybrid signal plot style

Continuous elements of a hybrid signal (mux of continuous and discrete) plotted using a line and discrete elements plotted using stairs.

Signal elements of a hybrid signal plotted using lines. Behavior is consistent with a Dataset logging timeseries plot of hybrid signals.

Programmatic access and scripting

Use set_param and get_param.

Changing Scope dialog parameters using set_param can put the Scope in an undefined state.

Use Scope Configuration object.

For backward compatibility, set_param and get_param continue to support dialog parameters in the old Scope. However, these parameters are hidden.

Legend location

Location of a legend on a scope serialized and restored when a model is re-opened.

Placed legends anywhere within a scope, but the location of the legend is not serialized.

Zoom Mode

ZoomMode serialized and restored when a model is re-opened.

ZoomMode not serialized and not restored when a model is re-opened.

Scope blocks in conditionally executed subsystemsScope data is not acquired when subsystem is not enabled.

Lines drawn connecting gaps in plotted data.

Scope data is not acquired when subsystem is not enabled.

Gaps in plotted data visible.

Fast Restart API: Programmatically run consecutive simulations more quickly

You can now enable fast restart from the command line using set_param. See Get Started with Fast Restart for more details.

You can also simulate a model in fast restart using sim and cvsim commands.

Previously, you could not use cvsim or signalbuilder with fast restart. In R2015b, you can now use these commands.

Auto solver that chooses solver for a model

Starting with R2015b, you can use the auto solver to select a solver and step size for simulating a model. The auto solver suggests a fixed-step or variable-step solver along with maximum step size based on the dynamics of the model. Select the auto solver in the solver pane and accept recommended settings in the solver information dialog box. For more information, see Use Auto Solver to Select a Solver.

Tunability of struct parameters in rapid accelerator mode

You can now tune struct parameters when you simulate a model in rapid accelerator mode.  Previously you tuned struct parameters only in normal and accelerator modes. You do not need to regenerate the rapid accelerator code when you tune struct parameters.

Port value labels for nonvirtual buses and bus signals

To monitor bus signal data during simulation, you can use port value labels for nonvirtual buses. You can also display port labels for individual signals in a bus through a new interface. For more information, see Display Value for a Specific Port.

Visualization of inserted rate transition blocks

When Simulink performs automatic rate transition, you can now see the rate transition blocks that Simulink inserts in your model. You can also set the Initial Condition of these blocks and change block parameters for rate transfers. For more information, see Visualize Inserted Rate Transition Blocks.

Common format for saving states, output, and final states data and other logging and loading techniques

The default for the Configuration Parameters > Data Import/Export > Format> > parameter is now Dataset, which:

  • Simplifies postprocessing of logged data

  • Makes it easier to take advantage of features that require Dataset format

Extended support for root Inport loading using Dataset format in rapid accelerator

Loading root Inport data using Dataset format in rapid accelerator mode is now supported for underspecified and complex buses and arrays of buses.

Free MinGW-w64 compiler for running simulations on 64-bit Windows®

You can now use the MinGW-w64 compiler from TDM-GCC to run simulations on 64-bit Windows® hosts. You can run simulations in Accelerator and Rapid Accelerator modes, build model reference simulation targets and S-functions, and simulate MATLAB Function blocks. To download and install the compiler, see Install MinGW-w64 Compiler.

Component-Based Modeling

More flexible configuration of Application lifespan (days) parameter in a model reference hierarchy for simulation

The Configuration Parameters > Optimization > Application lifespan (days) parameter can now be different for a parent and child model in a model reference hierarchy during simulation. This flexibility can be useful during model reference development. However, for code generation, the settings for this parameter must be consistent throughout a model reference hierarchy.

Model Advisor checks for simplified initialization mode

The Model Advisor Check consistency of initialization parameters for Outport and Merge blocks check has been replaced with four new checks. These checks help to migrate your model to simplified initialization mode. For more information, see the Model Advisor task Migrating to Simplified Initialization Mode Overview.

Changes to export-function models

Export-function models include these changes for R2015b.

Configuration Parameter for Scheduling Checks

A new model referencing configuration parameter, Enable strict scheduling checks for referenced export-function models, lets you enable or skip checks on scheduling order and sample-time consistency. This check applies to referenced export-function models. For more information, see Enable strict scheduling checks for referenced export-function models.

Triggered Sample Time for Function-Call Subsystems

You can now specify a discrete sample time for the function-call root-level Inport block for function-call subsystems whose trigger block has Sample time type set to Triggered. For more information, see Sample Time for Function-Call Subsystems in Export-Function Models.

Execution Order of Function-Call Root-Level Inport Blocks

The algorithm to determine block execution order has changed. Root-level function-call Inport block execution order is now determined first by priority, then by sample time, and then by the port number. For more information, see Execution Order for Function-Call Root-level Inport Blocks.

Compatibility Considerations

The algorithm to determine block execution order has changed. Specify low priority on the blocks you want to execute first.

Saving of list view parameters with Simulink.ConfigSet.saveAs

Previously, Simulink.ConfigSet.saveAs saved a configuration set that included the enabled parameters that appear in the category view in the Configuration Parameters dialog box. In R2015b, the method also saves the enabled parameters that appear only in the list view.

Project and File Management

Referenced Projects: Create reusable components for large modeling projects

You can organize large projects into components through the use of referenced projects. Componentization facilitates reuse, modular development, unit testing, and independent release of components. In R2015b, you can:

  • Add new components to your project by referencing other projects.

  • Use shortcuts to view and run files that belong to the referenced project.

  • Extract a folder from a project and convert the folder into a referenced project.

For more information, see:

Configuration Parameters List View: List, edit, and search all configuration parameters within your model​

The Configuration Parameters list view provides a complete list of parameters in the model configuration set. The list view includes parameters available in the category view and parameters previously available only from the command line. To use the list view, click the List button at the top of the Configuration Parameters dialog box.

You can use the list view to:

  • Search for specific parameters or filter parameters by category.

  • Sort parameters.

  • Edit parameter values.

  • View parameter dependencies.

  • Get parameter names for use in scripts.

For more information on the Configuration Parameters dialog box and the list view, see Configuration Parameters Dialog Box Overview.

Project Creation from a Model: Quickly organize your model and all dependent files

Put your model and all dependent files into a Simulink project in three clicks. If your model has supporting files, then a project makes it easier to manage. If you have more than one model, version, or user, a project can help you. The project provides these advantages:

  • Automate setup and shutdown tasks such as loading data and running scripts.

  • Manage any required files (not just models and libraries, but all your supporting files, such as data, images, scripts, functions, data dictionaries, requirements docs, etc.).

  • Manage your path when you open and close the project.

  • Visualize all file dependencies.

  • Use source control tools and compare versions.

In a Simulink model, select File > Simulink Project > Create Project from Model.

Simulink runs dependency analysis on your model to identify required files and suggest a project root location that contains all dependencies.

Faster, Improved Dependency Analysis: Analyze projects several times faster, identify referenced project files, and view library blocks

Dependency analysis of typical projects is faster, and includes new capabilities:

  • Identify dependencies on files in referenced projects.

  • Trace library link dependencies to view library block names in the graph.

Analyzing all project files is now the default, which helps to ensure that you explore all dependencies.

The dependency analysis workflow is simplified so that you can perform all operations in the graph view using one toolstrip tab. The Simulink Project tree now has a single Dependency Analysis view instead of three views separating file selection for analysis, the table of results, and the Impact graph. The table view of files is still available as an option, but you can perform all operations from the Impact graph view.

For details, see Perform Impact Analysis.

Management of shadowed and dirty files

Simulink Project now helps you to avoid working on the wrong files by detecting shadowed files when you open a project. If loaded model files shadow your project model files, you are prompted to inspect or close them. To avoid working on the wrong files, close the files that shadow your project files before continuing to open your project. You can choose to show or close individual files, or close all files that shadow with one click. Previously, you only saw a warning in the command window when you opened a model that another loaded file shadowed.

Simulink Project also now helps you to manage unsaved changes when closing a project. When you close a project, it closes any project models that are open, unless they are dirty. If model files have unsaved changes, then a prompt appears . You can see all dirty files, grouped by project if you have referenced projects. To avoid losing work, you can save or discard changes by file, by project, or globally.

Comparison of any pair of file revisions

In a Simulink project under source control, you can now select any pair of revisions to compare. This ability is useful for investigating differences in older changelists. You can now sort revisions by column headers in the Compare to Revision dialog box (e.g., by date, revision number, or author). The Compare to Revision dialog box has an improved layout, placing revision columns above the details pane, making it much easier to read.

Previously you could compare a revision only with your local file, making it more difficult to investigate older changes. You could not compare between other revisions, and you could not sort revisions.

For details, see Compare Revisions.

Updated power window example

The Power Window Control Project example has been updated to exercise more of the logic in the power window controller. The example uses the From Spreadsheet block to provide multiple sets of inputs to the controller. For more information, see Power Window.

Case-sensitive model and library names

Function Element Name What Happens When You Use This Function Element Use This Instead Compatibility Considerations

Case-insensitive model or library name

Simulink uses the closest case-insensitive match, and warns

Specify exact case

Case-insensitive matching will be removed in a future release.

Warning for Model Info Configuration Manager

Functionality

What Happens When You Use This Functionality

Use This Instead

Compatibility Considerations

Model Info block Configuration Manager

When a model's configuration manager is active, you see a new warning when loading or saving the model, or when you access the Model Info block.

For a more flexible interface to source control tools, use Simulink Project instead of the Model Info block.

The Configuration Manager will be removed in a future release. For help, see the Upgrade Advisor checks: Identify Model Info blocks that use the Configuration Manager and Identify Model Info blocks that can interact with external source control tools.

Data Management

Interval Logging: Specify start and stop time intervals to log only the data you need

You can use the new Configuration Parameters > Data Import/Export > Logging intervals parameter to specify an interval for logging data for:

  • Time

  • States

  • Output

  • Signal logging

  • The To Workspace block

  • The To File block

Limiting logging to specified intervals:

  • Allow you to view specific logged data without changing the model or adding complexity to a model

  • Simplifies analysis of logged data

  • Reduces simulation time

  • Reduces memory consumption

Always-On Tunability: Tune all block parameters and workspace variables during a simulation

Prior to R2015b, you selected Configuration Parameters > Optimization > Signals and Parameters > Inline parameters to increase simulation speed by treating block parameter values as constants. In this case, you could not tune these parameters during simulation. To preserve tunability for individual block parameters, you used data objects or the Model Parameter Configuration dialog box. Alternatively, clearing Inline parameters enabled block parameter tunability by default while reducing simulation speed.

In R2015b, you can tune block parameters during simulation, and you retain the simulation speed benefit. You do not need to use data objects or the Model Parameter Configuration dialog box to preserve parameter tunability during simulation. Inline parameters is now called Default parameter behavior. This configuration parameter does not affect simulation.

Prior to R2015b, when you displayed sample time colors, magenta indicated constant sample time. Now, magenta indicates blocks whose output values are constant. The term constant refers to blocks whose output values change only when you tune block parameters.

The table describes some block and system level changes caused by these enhancements.

Description of changeBehavior in R2015aBehavior in R2015b
Constant block with sample time set to infInline parameters selected: The block receives constant sample time. When you display sample time colors, the block appears magenta in color.

The block computes its output at the start of simulation and whenever you tune a block parameter. When you display sample time colors, the block appears magenta in color.

Inline parameters cleared: The block inherits a sample time from its context. The block color indicates the inherited sample time.
Relationship between sample time and parameter tunability

If you use a tunable parameter, such as a Simulink.Parameter object with a storage class other than Auto, to specify a numeric block parameter, the block inherits a sample time from its context.

The block computes its output at the start of simulation and whenever you tune a block parameter. When you display sample time colors, the block appears magenta in color.

Weighted sample time math blockInline parameters selected: If any of the block inputs are constant, Simulink displays an error.

The block inherits a sample time from its context.

Inline parameters cleared: The block inherits a sample time from its context.

For more information about changes to the configuration parameter Inline parameters with respect to code generation, see the R2015b Simulink Coder release notes.

For more information about constant sample time, see Constant Sample Time.

Compatibility Considerations

  • An error occurs in conditionally executed subsystems where:

    • A divide-by-zero operation occurs and all the blocks in the computation have constant output values.

    • The control input of an Index Vector block specifies an index that is out of range, and the block input has a constant value.

    Workaround: Use Upgrade Advisor to run Check model for parameter initialization and tuning issues. For more information, see Check model for parameter initialization and tuning issues.

  • Prior to R2015b, if a model contained Level-2 MATLAB S-Function blocks, and you selected Inline parameters, these blocks allowed constant sample time by default. In R2015b, Level-2 MATLAB S-Function blocks inherit a sample time from their context by default.

    Workaround: To enable these blocks to allow constant sample time, explicitly set SetAllowConstantSampleTime to true.

  • If you set Default parameter behavior to Inlined, and you log blocks that have tunable parameters, a mismatch can occur in the number of data points logged between the simulation and code generation workflows. However, the value logged remains constant where extra points are logged.

  • In the code generation workflow, when the Merge block receives a constant value and non-constant sample times, one of these conditions must hold. Otherwise Simulink displays an error.

    • The source of the constant value is a grounded signal.

    • The source of the constant value is a constant block with a non-tunable parameter.

      • There is only one constant block that feeds the Merge block.

      • All other input signals to the Merge block are from conditionally executed subsystems.

      • The Merge block and outport blocks of all conditionally executed subsystems should not specify any initial outputs.

      For more information, see Merge.

  • If you generate subsystem code for a subsystem that has any constant inputs, an error can occur.

    Workaround: Change the sample time at the source to an inherited or periodic sample time.

  • Models that had Inline parameters cleared and simulated without error in releases prior to R2015b can have rate transition issues in R2015b. These issues occur because all constant blocks now receive constant sample time regardless of the setting for Default parameter behavior. This change can produce different sample time propagation results.

    Workaround: Use Upgrade Advisor to run Check model for parameter initialization and tuning issues. For more information, see Check model for parameter initialization and tuning issues.

  • Suppose you generate code for a model where these conditions are true:

    • The default parameter behavior is tunable.

    • A constant block executes with a downstream rate that is not the fastest rate.

    The logged data appears to be delayed. There is a delay equal to one step of the slower rate that the block executes at. Simulink displays a warning during code generation.

    This issue does not affect signal logging during simulation.

  • If you write TLC code to generate code from an inlined S-function, and if the TLC code contains an Outputs function, you must modify the TLC code if all of these conditions are true:

    • An output port uses or inherits constant sample time. The output port has a constant value.

    • The S-function is a multirate S-function or uses port-based sample times.

    In this case, the TLC code must generate code for the constant-valued output port by using the function OutputsForTID instead of the function Outputs. For more information, see Specifying Constant Sample Time (Inf) for a Port.

  • Previously, if you selected Inline parameters, parameters that used the storage class Auto (including numeric MATLAB variables) were not tunable during simulation. The code generated for models referenced in accelerator mode and the code generated for top models or freestanding models in rapid accelerator mode inlined the numeric values of the variables. In R2015b, these parameters are tunable, and the code preserves them.

    • These parameters must exist throughout simulation. For example, if you reference a model in accelerator mode, you cannot use the referenced model CloseFcn callback to clear the parameters. Consider using the callback of the parent model instead. Alternatively, store the parameters in a Simulink data dictionary.

    • Suppose that you use a variable myVar in an inconsistent way, for example:

      • You use myVar as the value of the Gain parameter of a Gain block in a referenced model submodel1. The Gain block applies a data type, such as int32, to myVar.

      • You also use myVar in a Gain block in the referenced model submodel2. This Gain block applies a different data type, such as int16, to myVar.

      In R2015b, you cannot use myVar in an inconsistent way across these referenced models because myVar is tunable. To simulate the models, resolve the inconsistent usage. For example, modify the referenced models submodel1 and submodel2 so they apply the same data type to myVar.

  • Previously, the code generated in rapid accelerator mode did not preserve expressions, such as myVar + myOtherVar * 5, that you used to specify block parameter values. In R2015b, the code preserves these expressions.

    • If a block parameter value references workspace variables, you cannot change the block parameter value during rapid accelerator simulation. Instead, you can tune the values of the referenced variables. If you use a script to change the block parameter value during simulation, modify the script so it changes the values of the variables instead.

    • Suppose that a For Each subsystem has a mask parameter a whose value is the three-element array [1 2 3]. Suppose that the subsystem partitions the parameter a three times so that each iteration of the subsystem uses one of the elements in the array. You cannot use the expression 15.23^a to specify a block parameter value inside the subsystem because the expression contains an operator that the code generator does not support.

      To simulate the model, consider implementing the expression as a block algorithm instead. For more information about the operators that the code generator supports in tunable expressions, see Tunable Expression Limitations.

  • Previously, you could select Inline parameters to prevent mask initialization code from executing during simulation. This technique prevented code that made changes to the model from executing. If the changes generated errors during simulation, for example by attempting to add blocks to the model, selecting Inline parameters prevented the errors.

    In R2015b, all mask initialization code executes during simulation. To avoid errors during simulation, consider wrapping the mask initialization code in additional code that prevents it from executing during simulation.

Arrays of structures as parameters

You can use arrays of structures as parameters to:

  • Initialize arrays of bus signals that pass through blocks like Unit Delay. Arrays of buses help you to reduce signal line density in model diagrams. For more information, see Specify Initial Conditions for Bus Signals.

  • Specify the Constant value parameter in a Constant block. You can use this technique to compactly represent multiple constant-valued signals as an array of buses. For an example, see the Constant block.

  • Group workspace variables into a single variable whose value is an array of structures. You can use this technique to organize related variables and reduce workspace clutter. For more information about structure parameters, see Organize Related Parameters in Structures and Arrays of Structures.

  • Parameterize a For Each Subsystem, which can help you repeat an algorithm over multiple inputs. The subsystem can partition mask parameters that are arrays of structures. For an example, see Repeat an Algorithm Using a For Each Subsystem.

Improved methods to create custom data objects

Model Explorer

Previously, to create data objects such as Simulink.Parameter and Simulink.Signal, you used the Model Explorer buttons Add Parameter and Add Signal . To create data objects from a package other than Simulink, you specified the package using Simulink Preferences.

In R2015b, to select a data class other than those in the package Simulink, you can use the new arrows beside these buttons. You can select any data class whose definition is on the MATLAB path, including custom classes such as myPackage.myParameter.

For more information about creating data objects, see Data Objects.

Data Object Wizard

Previously, to create custom data objects using the Data Object Wizard, you specified a default data class package using Simulink Preferences.

In R2015b, to create objects from data classes in any package, including your own packages, you can select the classes using the Data Object Wizard.

For more information about creating data objects using the Data Object Wizard, see Create Data Objects for a Model Using Data Object Wizard.

No creation of parameter objects for mask initialization code

You now cannot use mask initialization code to create parameter objects. Parameter objects are objects of the class Simulink.Parameter and of any of its subclasses that you create. For more information about block masking and using MATLAB code to initialize a mask, see Initialize Mask.

Compatibility Considerations

If you use existing mask initialization code that creates parameter objects, you must edit the code so that it does not create parameter objects.

Sample time for signal logging

In the Signal Properties dialog box, you can use the new Sample Time option for a signal marked for signal logging. This option:

  • Maintains the separation of design and testing, because you do not need to insert a Rate Transition block to have a consistent sample time for logged signals

  • Reduces the amount of logged data for continuous time signals, for which setting decimation is not relevant

  • Eliminates the need to postprocess logged signal data for signals with different sample times

Same format for logging states, output, and final states as used for other logging and loading techniques

The default for the Configuration Parameters > Data Import/Export > Format parameter is now Dataset, which:

  • Simplifies post processing of logged data

  • Makes it easier to take advantage of features that require Dataset format

Root Inport loading in rapid accelerator mode using Dataset format

In rapid accelerator mode, using Dataset format to load root Inport blocks now supports:

  • Specifying a single Dataset object, as an alternative to specifying a long comma-separated list using the Configuration Parameters > Data Import/Export > Input parameter

  • Loading of buses and arrays of buses, including underspecified buses and arrays of buses

  • Loading of fixed-point and enum data

  • No code regeneration for new data

Logged signals with propagated names

Signal logging and root Outport block logging data for a signal captures the propagated signal name if the logging format is Dataset and:

  • For signal logging, you:

    • Mark one or more signals for signal logging and in the Signal Properties dialog box select Show Propagated Signals.

    • Enable Configuration Parameters > Data Import/Export > Signal logging.

  • For root Outport block logging, you select Configuration Parameters > Data Import/Export > Output.

The Simulink.SimulationData.Signal class has a new PropagatedName property for displaying the propagated signal name. The Simulink.SimulationData.Dataset class displays propagated signal names as a comment (the propagated signal name preceded by a percent sign (%)). In the logged data, the propagated signal name does not include angle brackets (<>).

Tolerance for data type mismatch between bus elements and structure fields

Previously, when you used a MATLAB structure to initialize a bus signal, or to drive a bus signal using a Constant block, you matched the data types of the structure fields with those of the bus signal elements.

In R2015b, you do not need to match the data types when you simulate a model. You can use doubles to specify the structure field values, and use the bus signal elements to control the data types. Prior to simulation, the bus elements cast the structure field values.

However, for other applications such as creating tunable initial conditions in the generated code, you must match the data types.

To decide whether to explicitly specify field data types, see Decide Whether to Specify Data Types for Structure Fields.

Summary of changes made to data dictionary

If you use a Simulink data dictionary to store the variables that a model uses, you can display a summary of all of the unsaved changes that you made to the dictionary. You can use this technique to:

  • Track your changes while you create and modify dictionary entries.

  • Decide which changes to keep or discard before you close an unsaved dictionary.

  • Recover variables that you deleted.

  • Recover dictionary references that you removed.

Rename All in Goto blocks

You can use the Rename All button in Goto block dialog boxes to quickly rename the corresponding tag in From and Goto Tag Visibility blocks. For more information, see the Goto block.

Change to visibility of SamplingMode property of signal objects

The Simulink.Signal property SamplingMode is hidden if you set it to 'auto', the default value. Previously, when you used a Simulink.Signal object to define a data store, you set SamplingMode to 'Sample based'. You can now leave the property at the default value, 'auto'.

If you use existing code that creates Simulink.Signal objects and changes the value of the SamplingMode property, the property is not hidden for these objects.

This change supports recent changes to frame-based processing with DSP System Toolbox. For more information, see Sample- and Frame-Based Concepts in the DSP System Toolbox documentation.

Continued availability of Simulink.saveVars

The R2014a Release Notes state that the function Simulink.saveVars will be removed in a future release. As of R2015b, you can continue to use this function. Existing scripts that use Simulink.saveVars do not generate warnings.

However, Simulink.saveVars is not recommended. To save workspace variables to a MATLAB script, use matlab.io.saveVariablesToScript instead of Simulink.saveVars.

Simulink.SimulationData.Dataset updates

Simulink.SimulationData.Dataset.find is a new method that finds elements with specified property names and values. For documentation on this method, in the MATLAB Command Window, type help Simulink.SimulationData.Dataset.find.

Edit Input button is now Connect Input

The Input > Edit Input button on the Configuration Parameters Data Import/Export pane is now Connect Input.

Legacy Code Tool support for conditional outputs

When you use the legacy_code function, you can now specify whether the legacy code conditionally writes the output ports. Use the outputsConditionallyWritten S-function option. If true, the generated S-function specifies that the memory associated with each output port cannot be overwritten and is global (SS_NOT_REUSABLE_AND_GLOBAL). If false, the memory associated with each output port is reusable and is local (SS_REUSABLE_AND_LOCAL). By default, the value is false (0).

Connection to Hardware

Raspberry Pi 2 Support: Run Simulink models on Raspberry Pi 2 Model B hardware

You can use the Simulink Support Package for Raspberry Pi™ Hardware with Raspberry Pi 2 Model B hardware.

Arduino Yun: Design and run Simulink models on Arduino Yun hardware

You can use the Simulink Support Package for Arduino® Hardware with Arduino Yun hardware.

Hardware Implementation Selection: Quickly generate code for popular embedded processors

Specification of hardware configurations has been simplified. Top-level Configuration Parameters dialog box panes, Run on Target Hardware and Coder Target, have been removed. Parameters previously available on those panes now appear on the Hardware Implementation pane. A parameter has also moved from the Code Generation pane to the Hardware Implementation pane.

This list summarizes the R2015b changes and new behavior:

  • By default, the Hardware Implementation pane lists Hardware board, Device vendor, and Device type parameter fields only.

  • If you use Simulink without a Simulink Coder license, initially parameters on the Hardware Implementation pane are disabled. To enable them, click Enable hardware specification. The parameters remain enabled for the current MATLAB session.

  • By default, the Hardware board list includes: None or Determine by Code Generation system target file, and Get Hardware Support Packages. After installing a hardware support package, the list also includes corresponding hardware board names.

  • If you select a hardware board name, parameters for that board appear in the dialog box display.

  • Lists for the Device vendor and Device type parameters have been updated to reflect hardware that is available on the market. The default Device vendor and Device type are Intel and x86-64 (Windows64), respectively.

  • If Simulink Coder is installed, the revised Hardware Implementation pane identifies the system target file that you selected on the Code Generation pane.

  • A Device details option provides a way to display parameters for setting details such as number of bits and byte ordering.

  • To specify target hardware for a Simulink support package, select a value from Configuration Parameters > Hardware Implementation > Hardware board. Before R2015b, you selected Tools > Run on Target Hardware > Prepare to run. Then, you selected a value from Configuration Parameters > Run on Target Hardware > Target hardware.

  • To specify target hardware for an Embedded Coder support package, select a value from Configuration Parameters > Hardware Implementation > Hardware board. Before R2015b, you selected a value from Configuration Parameters > Code Generation > Target hardware.

  • The Test hardware section was removed. Configure test hardware from the Configuration Parameters list view. Set ProdEqTarget to off, which enables parameters for configuring test hardware details.

  • If you set Configuration Parameters > Code Generation > System target file to ert.tlc, realtime.tlc, or autosar.tlc, the default setting for Configuration Parameters > Hardware Implementation > Hardware board is None. If you set System target file to value other than ert.tlc, autosar.tlc, or realtime.tlc, the default setting for Hardware board is Determine by Code Generation system target file.

For more information, see Hardware Implementation Pane.

Compatibility Considerations

Starting in R2015b:

  • By default, the Hardware Implementation pane lists Hardware board, Device vendor, and Device type parameter fields only. To view parameters for setting details, such as number of bits and byte ordering, click Device details.

  • The following devices appear on the Hardware Implementation pane only for models that you create with a version of the software earlier than R2015b. These devices are considered legacy devices.

    Generic, 32-bit Embedded Processor
    Generic, 64-bit Embedded Processor (LP64)
    Generic, 64-bit Embedded Processor (LLP64)
    Generic, 16-bit Embedded Processor
    Generic, 8-bit Embedded Processor
    Generic, 32-bit Real-Time Simulator
    Generic, 32-bit x86 compatible
    Intel, 8051 Compatible
    Intel, x86–64
    SGI, UltraSPARC Iii

    In R2015b, if you open a model configured for a legacy device and change the Device type setting, you cannot select the legacy device again.

  • Device parameter Signed integer division rounds to is set to Zero instead of Undefined. For some cases, numerical differences can occur in results produced with Zero versus Undefined for simulation and code generation.

    This change does not apply to legacy devices.

  • To associate a new model with an existing configuration set that has the following characteristics, configure the model to use the same hardware device as the existing model.

    • The model consists of a model reference hierarchy. Models in the hierarchy use different configuration sets.

    • The existing configuration set was saved as a script and associated with a configuration set variable.

    If the code generator detects differences in device parameter settings, a consistency error occurs. To correct the condition, look for differences in the device parameter settings, and make the appropriate adjustments.

Signal Management

Virtual bus signal inputs to blocks that require nonbus or nonvirtual bus input

Starting in R2015b, virtual bus signal input to blocks that require nonbus or nonvirtual bus input can cause an error. The error occurs when a virtual bus input signal is generated by a block that specifies a bus object as its output data type. Examples of blocks that can specify a bus object as its output data type include a Bus Creator block or a root Inport block. The blocks that cause an error when they have a virtual bus input in this situation are:

  • Assignment

  • Delay

    This block causes an error only if you set an initial condition from the dialog that is a MATLAB structure or zero and you specify a value for State name.

  • Permute Dimension

  • Reshape

  • Selector

  • Unit Delay

    This block causes an error only if you set an initial condition from the dialog that is a MATLAB structure or zero and you specify a value for State name.

  • Vector Concatenate

Generating an error when this situation occurs helps to promote consistent output by requiring proper input to these blocks.

To check for proper virtual bus usage and for Mux blocks used to create bus signals, use the new Upgrade Advisor Check bus usage check.

The new Upgrade Advisor check inserts a Bus to Vector block to attempt to convert virtual bus input signals to vector signals. For issues that the Upgrade Advisor identifies but cannot fix, modify the model manually. For details, see Correct Buses Used as Muxes and Prevent Bus and Mux Mixtures.

Compatibility Considerations

In R2015b, a virtual bus input signal to the affected blocks causes an error message, regardless of the Configuration Parameters > Diagnostics > Connectivity > Bus signal treated as vector setting.

In models created in releases earlier than R2015b, if the Bus signal treated as vector diagnostic setting is error, there is no compatibility issue when you run the model in R2015b.

To help you to address this issue, use the Upgrade Advisor Check bus usage check.

Entire nested bus assignment for Bus Assignment block

If a bus signal input to a Bus Assignment block contains a nested bus signal, then you can assign or select the nested bus signal as a whole. However, the nested bus cannot be nested inside of an array of buses. Before R2015b, you had to assign each signal in the nested bus.

Support for entire nested bus signal assignment reduces:

  • The number of blocks in a diagram

  • The maintenance effort

For details, see Bus Assignment.

Block Enhancements

Waveform Generator Block: Define and output arbitrary waveform signals​

The Waveform Generator block outputs waveforms using signal notations. This block is located in the Sources sublibrary.

From Spreadsheet Block: Read signal data into Simulink from a spreadsheet​

The From Spreadsheet block reads data from spreadsheets. This block is located in the Simulink Extras/Additional Sources sublibrary.

MATLAB System block support for nonvirtual buses

The MATLAB System block now supports nonvirutal buses. For more information, see Nonvirtual Buses and MATLAB System Block. For an example, see Using Buses with MATLAB System Blocks.

Inport block update

The Inport block now has a Connect Input button. Use this button to import, visualize, and map signal and bus data to root-level inports using the Root Inport Mapping tool.

From File updates for file name and signal preview

The From File block File name parameter has been updated to include:

  • A file browse button

  • A view button that lets you plot and inspect signals.

Inheriting of continuous sample time for discrete blocks

The Configuration Parameters > Diagnostics > Sample Time > Discrete used as continuous diagnostic was removed. If a discrete block (such as the Unit Delay block) inherits a continuous sample time, the block returns an error.

Evenly spaced breakpoints in Lookup Tables

A new format is available to specify evenly spaced breakpoints in the Prelookup and n-D Lookup Table blocks. For more information, see the Specification parameter in the Prelookup block reference page and the Breakpoints specification parameter in the n-D Lookup Table reference page.

Integrator block: Wrapped states for modeling rotary and cyclic state trajectories

The Integrator block has been enhanced to support wrapped states when modeling rotary, cyclic, or periodic state trajectories. This support for wrapping states provides these advantages.

  • It eliminates simulation instability when your model approaches large angles and large state values.

  • It reduces the number of solver resets during simulation and eliminates the need for zero-crossing detection, improving simulation time.

  • It eliminates large angle values, speeding up computation of trigonometric functions on angular states.

  • It improves solver accuracy and performance and enables unlimited simulation time.

Variant Subsystem block: Enhanced option for generating preprocessor conditionals

The option Generate preprocessor conditionals in the Variant Subsystem block parameters dialog box has been replaced with the option Analyze all choices during update diagram and generate preprocessor conditionals. When you select this option, Simulink analyzes all variant choices during an update diagram or simulation. This analysis provides early validation of the code generation readiness of all variant choices.

Compatibility Considerations

Previously, when the option to generate preprocessor conditionals was switched on, Simulink analyzed all variant choices only during the code generation phase. Now, Simulink performs this analysis during the update diagram phase. As a result, errors that you would normally see during code generation appear earlier, during an update diagram.

Constant sample time in S-function blocks

MATLAB S-function blocks no longer support a constant sample time (Inf) for their ports by default.

Compatibility Considerations

To allow ports in your MATLAB S-function blocks to have a sample time of Inf, use the SetAllowConstantSampleTime command.

MATLAB Function Blocks

Calling of Simulink Functions

You can call a Simulink Function block from inside of a MATLAB Function block. You can also call Stateflow functions with Export Chart Level Functions (Make Global) and Allow exported functions to be called by Simulink checked in the chart Properties dialog box.

Nondirect feedthrough in MATLAB Function blocks

By default, MATLAB Function blocks have direct feedthrough enabled. To disable, in the Ports and Data Manager, you can now clear the Allow direct feedthrough check box. Nondirect feedthrough enables semantics to ensure that outputs rely only on current state.

To use nondirect feedthrough, do not program outputs to rely on inputs or updated persistent variables. For example, do not use the following code in a nondirect feedthrough block:

counter = counter + 1;  	% update state
output = counter;       	% compute output based on updated state
Instead, use code such as:
output = counter;       	% compute output based on current state
counter = counter + 1;  	% update state

Also, nondirect feedthrough semantics require function inlining. Do not disable inlining.

Using nondirect feedthrough enables you to use MATLAB Function blocks in a feedback loop and prevent algebraic loops.

Overflow and data range detection settings unified with Simulink

Previously, you controlled overflow detection in MATLAB Function blocks with the configuration parameter Detect wrap on overflow. This parameter was on the Simulation Target pane in the Model Configuration Parameters dialog box.

You now control the overflow detection for MATLAB Function blocks with the configuration parameter Wrap on overflow. This parameter is on the Diagnostics: Data Validity pane in the Model Configuration Parameters dialog box. Choose one of these settings: none, warning, and error.

Previously, you controlled data range error checking in MATLAB Function blocks in the editor, with Simulation > Debug > MATLAB & Stateflow Error Checking Options > Data Range.

You now control data range checking with the configuration parameter Simulation range checking. This parameter is on the Diagnostics: Data Validity pane in the Model Configuration Parameters dialog box. Choose one of these three settings: none, warning, and error.

Compatibility Considerations

When you open a model with a MATLAB Function block saved in a previous release, a change in behavior is possible. These options are no longer valid.

  • Detect wrap on overflow on the Simulation Target pane of the Model Configuration Parameters dialog box

  • Simulation > Debug > MATLAB & Stateflow Error Checking Options > Data Range in the Stateflow editor

In R2015b, the software determines overflow detection and data range by the setting of these Simulink options on the Diagnostics: Data Validity pane in the Model Configuration Parameters dialog box.

  • Wrap on overflow

  • Simulation range checking

Set each configuration parameter to none, warning, or error. The software displays a warning if the previous MATLAB Function block options saved with the model were set differently than the current Simulink options.

The command-line parameter SFSimOverflowDetection is no longer valid. Use IntegerOverflowMsg instead. The API parameter Debug.RunTimeCheck.DataRangeChecks is no longer valid. Use the command-line parameter SignalRangeChecking instead.

When you save a current model with a MATLAB Function block in a previous version, the current Simulink parameters are saved. Both the MATLAB Function block overflow and data range parameters are saved as selected.

No frame-based sampling mode for outputs

In R2015b, you can no longer set the sampling mode of outputs to frame based in MATLAB Function blocks. Models created in previous releases using frame-based sampling mode continue to behave as they did before this release.

Code generation for cell arrays

In R2015b, you can generate code from MATLAB code that uses cell arrays.

The code generation software classifies a cell array as homogeneous or heterogeneous. This classification determines how a cell array is represented in the generated C/C++ code. It also determines how you can use the cell array in MATLAB code from which you generate C/C++ code. See Homogeneous vs. Heterogeneous Cell Arrays.

As long as you do not specify conflicting requirements, you can control whether a cell array is homogeneous or heterogeneous. See Control Whether a Cell Array is Homogeneous or Heterogeneous.

For information about restrictions when you use cell arrays in a MATLAB Function block, see Cell Array Requirements and Limitations for Code Generation.

LAPACK calls during simulation for algorithms that call linear algebra functions

To improve the simulation speed for MATLAB Function block algorithms that call linear algebra functions, the simulation software can now call LAPACK functions. If the input arrays for the linear algebra functions meet certain criteria, the simulation software generates calls to relevant LAPACK functions.

LAPACK is a software library for numerical linear algebra. MATLAB uses this library in some linear algebra functions such as eig and svd. The simulation software uses the LAPACK library that is included with MATLAB.

For information about the open source reference version of LAPACK, see LAPACK — Linear Algebra PACKage.

Code generation for additional Statistics and Machine Learning Toolbox functions

R2015a

New Features, Bug Fixes, Compatibility Considerations

Simulink Editor

Bus Smart Editing Cue: Automatically create a bus from a set of signals

You can select multiple blocks or signals in an area of a model to create a bus for.

Using the Create Bus button to create a bus automatically performs these actions:

  • Creates a Bus Creator block with the right number of inputs

  • Resizes the Bus Creator block to an appropriate size for the number of input signals

  • Orients the Bus Creator block to the direction of the input signals

  • Connects the signals to the Bus Creator block

Area Annotations: Call out and separate regions of interest in model

You can select multiple objects in an area of a model to annotate an area of interest in your model.

  1. In the Simulink Editor, drag to select the area of the model you want to create an area around.

  2. In the action bar, click Create Area.

For more information, see Box and Label Areas of a Model.

Perspectives Controls: Access alternative views of your model, such as harness and interface views

You can switch to different views of a model, such as harness view to view test harnesses and interface view to view interfaces of your system.

  1. In the Simulink Editor, click the control in the lower-right corner.

  2. Click the view you want to see.

Saving of viewmarks in Simulink models

You can now store viewmarks with your model. For more information, see Use Viewmarks to Save Views of Models.

Highlighting of the subsystem you navigated from

When you navigate out of a subsystem, Simulink now highlights that subsystem temporarily. The highlight helps you to identify the subsystem you were working in most recently.

Annotation connector colors and width

You can now specify the color and width of annotation connectors. Right-click the annotation connector and use the Format menu.

To create an annotation connector, see Add Lines to Connect Annotations to Blocks

Undo and redo of block parameter value changes

Block parameter changes using block dialog boxes are now undoable. When you use Undo after you make changes to block parameter values, the values revert and the affected block briefly appears highlighted. A Redo command as the next action restores the changes and also briefly highlights the block. For more information on Undo and Redo, see Interactive Model Building.

Display of product name in model title bar

The Simulink Editor now displays the word Simulink next to the model name in the model title bar.

Simulation Analysis and Performance

Dashboard Block Library: Tune and test simulations with graphical controls and displays

The Dashboard block library contains controls and displays that enable you to tune block parameters or monitor signals. The controls can be active during simulation so you can tune parameters and optimize your model while it is running or paused. The blocks are added directly to your Simulink model canvas and connected to signals or blocks. The Dashboard block library includes:

  • Knobs

  • Switches

  • Gauges

  • Dashboard scope

  • Lamp

Algebraic Loop Highlighting: Find and remove algebraic loops in the model to boost simulation speed

You can now identify and remove all algebraic loops in your model using the new highlight feature. This option traverses through the hierarchy of a model to highlight real and artificial algebraic loops. A report lists the loops with color codes for easy isolation. This technique allows you to view all the loops in a model simultaneously, so you can remove them quickly and speed up your simulation.

For more information, see Highlight Algebraic Loops in the Model.

Faster Simulations with Accelerated Referenced Models: Run faster consecutive simulations and step back and forth through simulations

Simulating referenced models in Accelerator mode now supports these actions that involve using SimState:

  • Do a fast restart

  • Save complete SimState in final state logging

  • Restart from saved state

  • Step through a simulation

If the referenced model simulated in Accelerator mode contains any of these blocks, then you cannot perform the actions listed above:

  • Level 2 MATLAB S-Function

  • MATLAB System

  • n-D Lookup Table

  • S-Function (with custom SimState or PWork vectors)

  • To File

  • Simscape blocks

Use SimulationMetadata to retrieve simulation metadata information

You can store and retrieve metadata about a simulation using SimulationMetadata. The SimulationOutput object of the simulation contains the metadata object. Use SimulationMetadata to analyze archived simulations or compare results from multiple simulations. See Simulink.SimulationMetadata for more details.

Simplified conversion of logged data to Dataset format for a common logged data format

You can use the Simulink.SimulationData.Dataset constructor to convert data that was logged in one of the following formats to Dataset format:

  • Array

  • Structure

  • Structure with time

  • MATLAB timeseries

  • ModelDataLogs

Converting data from other Simulink logging formats to Dataset format simplifies writing scripts to post-process data logged using different:

  • Logging techniques (for example, for models with multiple To Workspace blocks using different data formats or for models that use To Workspace blocks and log signals using ModelDataLogs format)

  • Simulation modes (for example, Normal and Accelerator)

The conversion to Dataset format also makes it easier to take advantage of features that require Dataset format. Now you can easily convert data logged in earlier releases that used a format other than Dataset to work well with Dataset data in a more recent release.

You can use the Simlink.SimulationData.Dataset.concat method to combine Dataset objects into one concatenated Dataset object.

For more information, see Simulink.SimulationData.Dataset.

Default setting for Automatic solver parameter selection

The default setting for Automatic solver parameter selection in the Diagnostics pane of the Model Configuration Parameters dialog box is now set to none. Previously, the default setting for this option was warning.

Improved heuristic for step size calculation

Simulink now uses an improved heuristic to calculate the Max step size and Fixed step size when you set these parameters to auto in the Solver pane of the Model Configuration Parameters dialog box. The heuristic uses the dynamics of a model in a better way to calculate these parameters. For more information, see Max step size.

Step size details in solver information tooltip

When you set Max step size and Fixed step size to auto in the Solver pane of the Model Configuration Parameters dialog box, you can see the numerical values of these settings in the solver information tooltip. Previously, Simulink displayed this information as a warning message. For more information, see Solver Overview.

Solver information in model after simulation

Starting in R2015a, after a model compiles, the right hand corner of the status bar displays the solver used to compile a model. Previously, Simulink reverted to the configuration setting after a simulation completed. For more information, see Solver Overview.

Component-Based Modeling

Consistent Data Support for Testing Components: Load input and log data of a component from buses and all data types

Logging states and root outports now supports full logging capabilities in Normal and Accelerator (including Model Reference Accelerator) simulation modes. State and root outport logging in R2015a:

  • Supports all data types, including:

    • Bus data (virtual and nonvirtual buses and arrays of buses)

    • Enumerated data

    • Fixed-point data

  • Logs states and outports based on their rates

Simulink supports Dataset objects for root inport data import, which eliminates the need to specify multiple inputs using a comma-separated list.

Model Reference Conversion Advisor enhancements

In R2015a, the Model Reference Conversion Advisor make the conversion of a subsystem to a referenced model easier than in previous releases.

  • You can have the advisor compare the results of simulating the top model for the referenced model to the results of simulating the baseline model that has the subsystem. In the Check conversion input parameters check, select Check simulation results after conversion.

    You can specify the following for the comparison of the simulations:

    • Stop time for the simulation

    • Absolute signal tolerance

    • Relative signal tolerance

  • In the Check conversion input parameters check, you can specify the simulation mode for the Model block that references the referenced model.

  • The conversion process stores all of the data it creates (bus objects, signal objects, and tunable parameters) in one file. To specify the file for the advisor to use, in the Check conversion input parameters check, use the Conversion data file name option.

  • The reports for the checks include links that highlight the relevant blocks in the model.

  • Restoring the model to the pre-conversion state is faster than in previous releases. Also, the report for the Complete conversion check now includes a link to restore the model. That option provides an alternative to selecting File > Load Restore Point in the advisor.

The Simulink.SubSystem.convertToModelReference function supports the Model Reference Conversion Advisor capabilities.

Reduced algebraic loops during model reference simulation

Model reference simulation now addresses some cases that previously resulted in algebraic loops.

Multi-instance support for nonreusable functions in referenced models

Simulation of nonreusable functions in referenced models no longer forces you to set the Configuration Parameters > Model Referencing > Total number of instances allowed per top model parameter to One. You can also set the parameter to Multiple.

Model referencing checks in Model Advisor to reduce warning messages

The Model Advisor includes two new checks to reduce the number of warning messages during simulation and code generation. These checks replace the Configuration Parameters > Diagnostics > Model Referencing > Model configuration mismatch diagnostic, which generated many warning messages that you could safely ignore.

  • The Check diagnostic settings ignored during accelerated model reference simulation check lists models referenced in Accelerator mode for which you set certain runtime diagnostics to a value other than none or Disable all.

    Simulink ignores the diagnostics that the check lists. For more information, see Certain Diagnostic Configuration Parameters Ignored for Models Referenced in Accelerator Mode.

  • The Check code generation identifier formats used for model reference check lists referenced models with certain parameters whose settings do not contain a $R token (which represents the name of the reference model). Code generation prepends the $R token (if not present) to the identifier format. For more information, see Configuration Parameters Changed During Code Generation.

Compatibility Considerations

The Model configuration mismatch diagnostic no longer appears in the Configuration Parameters > Diagnostics > Model Referencing pane. Simulink ignores the setting of the corresponding ModelReferenceCSMismatchMessage parameter.

  • When loading a configuration set from a MAT-file or a model, if the parameter setting is either error or warning, the setting is not honored and remains none.

  • When you save a configuration set to a MAT-file or save a model to disk, the parameter is not saved.

  • When you export a model to a previous version, the parameter is written to disk with a setting of none.

  • If you use get_param with this parameter on a configuration set or on a model, the returned value is always the default value (none).

  • If you use a set_param command for this parameter on a configuration set or on a model with a setting other than none, Simulink ignores the setting.

Model configuration parameter changes

The following configuration parameters are no longer supported and are not saved in the model configuration:

  • CodeGenDirectory (Simulink Coder)

  • ConfigAtBuild (Simulink Coder)

  • ConfigurationMode (Simulink Coder)

  • ConfigurationScript (Simulink Coder )

  • CustomRebuildMode (Simulink Coder)

  • DataInitializer (Simulink Coder)

  • Echo

  • EnableOverflowDetection

  • FoldNonRolledExpr

  • GenerateClassInterface(Simulink Coder)

  • GenerateCodeInfo (Simulink Coder)

  • IncludeERTFirstTime (Simulink Coder)

  • InitialValueSource (Embedded Coder)

  • MisraCompliance (Embedded Coder)

  • ModuleName (Embedded Coder)

  • ModuleNamingRule (Embedded Coder)

  • ProcessScript (Simulink Coder)

  • ProcessScriptMode (Simulink Coder)

  • SimBlas

  • SimDataInitializer

  • SimExtrinsic

  • TargetTypeEmulationWarnSuppressLevel

  • UseTempVars

In R2014b, these configuration parameters were command-line only parameters and were not available in the Configuration Parameters dialog box.

Compatibility Considerations

  • When you save a configuration set to a MAT-file or save a model to disk, these parameters are NOT saved.

  • If you use a set_param command with one of these parameters on a configuration set or on a model, the value of the parameter is only changed while the model is loaded in the current MATLAB session.

  • If you use a get_param command with one of these parameters on a configuration set or on a model, the behavior is unchanged.

Property name change in Simulink.ConfigSetRef

The WSVarName property of the object has been renamed to SourceName. The SourceName property specifies the name of the variable in the workspace or the data dictionary that contains the referenced configuration set. The WSVarName will be removed in a future release.

Compatibility Considerations

To avoid future incompatibility, change instances of this property name to the new name.

Flexible structure assignment of buses

When a non-tunable structure is assigned to a bus signal (such as a block which uses a structure for its initial condition parameter), the data types of the fields of the structure no longer need to match the data types of the bus elements. The software now performs an automatic casting of the data type of the structure field so that it matches the data type of the bus signal.

Support for empty subsystems as variant choices

Previously, if you added an empty subsystem with no inputs or outputs as a variant choice inside a Variant Subsystem block, Simulink discarded the empty subsystem. This is because empty variant choices were considered invalid. Moreover, if the Variant Subsystem block contained a valid variant choice and an empty variant choice, no preprocessor conditionals were generated for the valid choice when you built the model.

In R2015a, Simulink considers an empty subsystem as a valid variant choice. If you add an empty variant choice inside a Variant Subsystem block, specify a variant condition for this choice in one of the following ways.

  • Specify a variant activation condition for the empty choice. During simulation, if the empty variant choice is active, Simulink ignores the empty choice.

  • Comment out the variant activation condition by placing a % symbol before the condition.

Moreover, if the Variant Subsystem block contains a valid variant choice and an empty variant choice, preprocessor conditionals are now generated for the valid choice when you build the model.

Conversion of MATLAB variables used in variant control expressions into Simulink.Parameter objects

MATLAB variables allow you to rapidly prototype variant control expressions when you are building your model. Previously, if you wanted to generate preprocessor conditionals for code generation, you had to manually convert these variables into Simulink.Parameter objects.

In R2015a, use the function Simulink.VariantManager.findVariantControlVars to find and convert MATLAB variables used in variant control expressions into Simulink.Parameter objects. For an example, see Convert Variant Control Variables into Simulink.Parameter Objects.

Project and File Management

Simulink Project Sharing: Share a project using GitHub, email, or a MATLAB toolbox

Release 2015a provides new options for sharing Simulink projects:

  • Make your project publicly available on GitHub®.

  • Share your project via email.

  • Package your project as a MATLAB toolbox.

For details, see Sharing Simulink Projects.

Interactively manage the MATLAB search path for your project

You can interactively add or remove folders from the project path. With Simulink Project, opening your project adds the project path to the MATLAB search path. Closing your project removes the project path from the MATLAB search path. For more information, see Specify Project Path.

Easy viewing and editing of project labels

R2015a provides easier management of label data through the improved file details view.

Changed file lists and branch deletion in Git Manage Branches dialog box

In R2015a, when using Git source control, you can view branch details and delete branches in the Manage Branches dialog box. You can see which files changed for a particular commit in the branch viewer, and view the author, date, and commit message.

New preferences to control loading and saving models

Simulink has a new preference, Do not load models that are shadowed on the MATLAB path. Use the preference to specify whether to load a model that is shadowed by another file of the same name higher on the MATLAB path. If you turn the preference on by selecting the check box, then Simulink displays an error when you try to load a shadowed model. For details, see Do not load models that are shadowed on the MATLAB path.

Another preference, Do not load models created with a newer version of Simulink, is now on by default. These preferences help you avoid accidentally loading or editing the wrong model or library.

You can use a new preference, Save a thumbnail image inside SLX files to control whether to save a small screen shot image of the model. You can view the screenshot for a selected model in the Current Folder browser preview pane. If your model is very large and you want to reduce the time taken to save the model, then you can turn this preference off to avoid saving thumbnail model images.

Compatibility Considerations

The preference Do not load models created with a newer version of Simulink is now on by default. Simulink does not the load the model and displays an error message in the Command Window. In previous releases, the preference was off by default, so Simulink loaded models last saved in a newer version and displayed a warning message.

Improved error reporting from get_param, set_param and save_system

The functions get_param, set_param and save_system have improved error reporting to help you correct problems specifying the correct model or block. The new messages tell you if the model is not loaded, the model name is not valid, or the block is not found in the specified model.

Model dependency analysis option to find enumeration definition files

In R2015a, model dependency analysis provides an option to search for enumeration definition files. Turn on this option to detect enumerated data types used as part of a bus object definition. You can then include the files when exporting the model and required files into a zip file.

The option is not on by default because it requires a model update. You cannot perform this search with project impact analysis, because the search requires model updates. Instead, select Analysis > Model Dependencies > Generate Manifest, and turn on the Find enumeration definition files (performs a Model Update) option.

For details, see Generate Manifests.

Export to previous version supports seven years

In R2015a, in the Export to Previous Version dialog box, the Save as type list includes seven years of previous releases. In future releases, this list will continue to provide seven years of previous releases.

In previous releases, the list included versions back to R14 (2004). If you want to export to older versions than seven years, you can use the save_system function instead. For details, see save_system.

Data Management

Data Dictionary API: Automate the creation and editing of data dictionaries with MATLAB scripts

You can now manage data dictionaries and interact with dictionary content at the MATLAB command prompt in addition to the Model Explorer. For example, you can:

  • Migrate models to use data dictionaries

  • Import data from and export data to external files and the MATLAB base workspace

  • Create, delete, and reassign entries

  • Save and discard changes to entire dictionaries or discard changes to individual entries

  • Search for specific entries

  • Compose reference dictionary hierarchies

See Store Data in Dictionary Programmatically for examples and a list of relevant functions and classes.

Rename All: Change the name of a parameter and all its references

You can now use Model Explorer to rename a variable everywhere it is used by blocks in a Simulink model.

See Rename Variables for an example.

MATLAB Editor features for editing model workspace code

When you view the dialog box for a model workspace, for example using the property dialog pane of Model Explorer, and set Data source to MATLAB Code, the code editing area now behaves like the MATLAB Editor. For example, the editing area applies syntax highlighting to your code.

Management of variables from block dialog box fields

You can now navigate to and edit variables by right-clicking expressions that you specify in block dialog boxes. For each variable in an expression, you can navigate to the workspace that defines the variable or open a separate dialog box to edit the variable.

You can also create variables by right-clicking an expression that contains the names of potential variables. For each name you specify in the expression, you can create a variable in a workspace that is appropriate for the model.

See Manage Variables from Block Parameter for more information.

Other Data section added to data dictionary

To store reference data that are not used by a model for simulation, but that are still relevant to the model, use the Other Data section of a data dictionary. For example, if a model simulates the behavior of mechanical equipment, you can store the manufacturer specifications in the Other Data section.

You can also store objects of any MATLAB or Simulink class, including custom classes, in the Other Data section of a dictionary. By contrast, the Design Data section stores only objects relevant to simulation of a model.

Data dictionaries now have a Design Data section, a Configurations section, and an Other Data section. Prior to R2015a, the Design Data section was named Global Design Data.

Model-wide renaming of data stores

You can now rename a data store everywhere it is used by Data Store Read and Data Store Write blocks in a Simulink model. Previously, you manually updated all Data Store Read and Data Store Write blocks with the new name of the data store.

See Rename Data Stores for more information.

Reporting of enumerated types used by model

You can now use the existing function Simulink.findVars to discover the enumerated data types that are needed by a model. Simulink.findVars can report the names of enumerated types that are used to define model variables.

You can enable the reporting of enumerated types using the name-value pair IncludeEnumTypes. With this name-value pair enabled, Simulink.findVars returns a Simulink.VariableUsage object for each enumerated type in addition to the Simulink.VariableUsage objects returned for model variables.

Root Inport Mapping tool updates

The Root Inport Mapping tool now supports:

Connection to Educational Hardware

Simulink Support Package for Apple iOS Devices: Create an App that runs Simulink models and algorithms on your Apple iOS device

You can run Simulink models on Apple iOS devices. You can also tune parameter values in the model, and receive data from the model, while it is running on these devices.

Use the Simulink Support Package for Apple iOS Devices block library to access the Apple iOS hardware:

To install or update this support package, perform the steps described in Install Support for Apple iOS Devices.

MathWorks response to the Shellshock vulnerability

The support package for BeagleBoard (v14.2) contains a vulnerable version of the Bash shell. The default configuration of this support package does not expose this vulnerability to a network connection. We recommend running this device inside of a trusted network or behind a firewall. We will update this package as updated software is available.

Removed support for Gumstix Overo and PandaBoard hardware

The following support packages have been removed and are no longer available:

  • Simulink Support Package for Gumstix® Overo® Hardware

  • Simulink Support Package for PandaBoard Hardware

Signal Management

Array of buses with Unit Delay block

You can use an array of buses as an input signal to a Unit Delay block.

Block Enhancements

Resettable Subsystem block to reset the subsystem states

The Resettable Subsystem block is a new block in the Ports & Subsystems library. Use this subsystem to reset the states of all blocks inside the subsystem on triggering. For more information, see Resettable Subsystem.

Conditional display of the Sample Time parameter

The Sample Time parameter in the dialog box of certain Simulink blocks is now hidden by default. If you set the sample time to a value other the default (at the command line or if it is set that way in an existing model), then the parameter is visible. For more information, see Blocks for Which Sample Time Is Not Recommended.

Inheritance of frame-based input returns error

    Note:   This release note applies only if you have installed DSP System Toolbox.

As part of general product-wide changes pertaining to frame-based processing, certain block options that use the frame attribute of the input signal now cause an error in Simulink. For more information on changes in the DSP System Toolbox, see Frame-based processing.

The following sections provide more detailed information about the specific R2015a Simulink software changes for frame-based processing:

Input Processing Parameter Set to Inherited

Setting Input processing parameter to Inherited now errors for these blocks:

Compatibility Considerations

To ensure consistent results for models created in previous releases, set Input processing to:

  • Columns as channels (frame based), for frame-based input signals (double-line)

  • Elements as channels (sample based), for sample-based signal input signals (single-line)

If you are not sure of which option to choose, select and run the Simulink Upgrade Advisor checks:

  • Check model for block upgrade issues requiring compile time information

  • Check model for custom library blocks that rely on frame status of the signal, for blocks in a custom library

Inherited Setting on Save 2-D Signals

In the To Workspace block, setting the Save Format parameter to Structure or Array and the Save 2-D signals as parameter to Inherit from input now causes an error.

Compatibility Considerations

To ensure consistent results for models created in previous releases, set Save 2-D signals as to

  • 3-D array (concatenate along third dimension), for sample-based input signals

  • 2-D array (concatenate along first dimension), for frame-based input signals

For models created in R2015a:

  • For frame-based processing, set Save 2-D signals as to 2-D array (concatenate along first dimension).

  • For sample-based processing, set Save 2-D signals as to 3-D array (concatenate along third dimension).

If you are not sure of which option to choose, run these Simulink Upgrade Advisor checks:

  • Check model for block upgrade issues requiring compile time information

  • Check model for custom library blocks that rely on frame status of the signal, for blocks in a custom library

Frame-based Inputs Removed for Bias Block

Frame-based input support is removed from the Bias block.

Compatibility Considerations

To ensure consistent results for models created in older releases,

  1. Change the block input to sample based by inserting a Frame Conversion block with Sampling mode of output signal set to Sample-based.

  2. Insert a Frame Conversion block at the output of the block with Sampling mode set to Frame based.

  3. Set the bias parameter of the block to repmat(b, N, 1), where b is the value of the bias, and N is the input frame length.

Frame-based Inputs Removed for Tapped Delay Block

Frame-based input support is removed from the Tapped Delay block.

Compatibility Considerations

To ensure consistent results for models created in older releases, replace the Tapped Delay block by a Unit Delay block with Input Processing set to Columns as channels (frame based).

Frame-based Input Removed for Transfer Fcn First Order Block

Frame-based signal support is removed from the Transfer Fcn First Order block.

Compatibility Considerations

To ensure consistent results for models created in older releases:

  1. Replace the Transfer Fcn First Order block with a Discrete Transfer Fcn block.

  2. In the Discrete Transfer Fcn block, set Input Processing to Columns as channels (frame based).

  3. Set Numerator, Denominator and Initial Condition of the new block to [1-p 0], [1 -p] and ic/(1-p), respectively, where p is the value of the pole and ic is the value of the initial condition on the Transfer Fcn First Order block.

Frame-based Input Removed for Transfer Fcn Lead or Lag Block

Frame-based input support is removed from the Transfer Fcn Lead or Lag block.

Compatibility Considerations

To ensure consistent results for models created in older releases:

  1. Replace the Transfer Fcn Lead or Lag block by a Discrete Filter block.

  2. In the Discrete Filter block, set Input Processing to Columns as channels (frame based) and Filter Structure to Direct form I.

  3. Set Numerator and Denominator of the new block to [1 -z] and [1 -p], respectively, where p is the value of the pole and z is the value of the zero on the Transfer Fcn Lead or Lag block.

Sampling Mode Set to Frame-based

Setting Sampling Mode parameter to Frame based now errors for these blocks:

Compatibility Considerations

To ensure consistent results for models created in older releases, set Sampling Mode to Sample based or Auto instead.

If you are not sure of which option to choose, select and run the Simulink Upgrade Advisor checks:

  • Check model for block upgrade issues requiring compile time information

  • Check model for custom library blocks that rely on frame status of the signal, for blocks in a custom library

Scope block to Time Scope Block conversion

You can convert a Scope block to a Time Scope block to try the new block. On the Scope toolbar, click the Try Time Scope button . The Scope block converts to a Time Scope block. For Floating Scopes, this button is disabled (grayed out).

The Time Scope block includes simulation controls (run, forward, backward), additional support for signals (sample-based, frame-based), and debugging tools such as Cursors and Triggers. See Migrate Scope To Time Scope.

Option to provide PID gains as external inputs to PID Controller and PID controller (2DOF) blocks

A new option in the PID Controller and PID Controller (2DOF) blocks adds signal inputs for the PID gains and filter coefficients. Previously the PID parameters had to be entered in the block dialog box as numerical values or MATLAB expressions. Enabling external inputs for the parameters allows you to compute PID gains and filter coefficients externally to the block and provide them to the block as signal inputs. External gain input is useful, for example, to implement gain-scheduled PID control, in which controller gains are determined by logic or other calculation in the Simulink model and passed to the block. To enable external inputs for the PID coefficients, in the block dialog box, in the Controller parameters section, in the Source menu, select external.

When you click OK or Apply, the new inputs appear on the block in the Simulink model.

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

Improvements for creating System objects

The following improvements have been made to creating your own System objects:

  • Number of allowable code generation inputs increased to 32

  • isInputSizeLockedImpl method for specifying whether the input port dimensions are locked

  • matlab.system.display.Action class, used in the getPropertyGroupsImpl method, to define a MATLAB System block button that can call a System object method

  • getSimulateUsingImpl and showSimulateUsingImpl methods to set the value of the SimulateUsing parameter and specify whether to show the SimulateUsing parameter in the MATLAB System block

MATLAB System block support for model coverage analysis

The Simulink Verification and Validation software now supports model coverage analysis for the MATLAB System block with the Simulate using parameter set to Code generation. For more information, see MATLAB System Block Limitations.

Enable port on the Delay block

The Delay block now provides an enable port to control its execution at every time step. You can show this port using the Show enable port parameter in the block dialog box. For more information, see the Delay block reference page.

MATLAB Function Blocks

More efficient generated code for logical indexing

Code generated for logical array indexing is faster and uses less memory than in previous releases. For example, the generated code for the following function is more efficient than in previous releases.

function x = foo(x,N)
assert(all(size(x) == [1 100]))
x(x>N) = N;

In R2015a, you do not have to replace x(x>N) = N with a for-loop to improve performance.

Faster compile time for large functions and models due to decreased constant folding limit

When possible, the code generation software replaces an expression with the result of the expression evaluation. This practice is called constant folding. In R2015a, the maximum number of instructions that the code generation software constant folds is lower than in previous releases. The lower constant folding limit can reduce compile times for large functions and models.

Compatibility Considerations

For large functions or models, it is possible that some expressions that were constant-folded in previous releases are not constant-folded in R2015a. In these cases, the generated code contains the expressions rather than the results of the evaluated expressions.

JIT compilation technology to reduce model update time

MATLAB Function block uses just-in-time (JIT) compilation technology to improve model update of many MATLAB Function blocks. For these blocks, Simulink does not generate C code or a MEX-file to simulate the block. Simulink applies JIT mode to MATLAB Function blocks that qualify. You do not have to enable it.

When a MATLAB Function block uses JIT mode, debugging is disabled. To debug, set a breakpoint in the MATLAB Function block before simulation. Simulink enables debugging, and does not use JIT mode.

Compatibility Considerations

Be default, the software uses JIT mode on MATLAB Function blocks to speed up compilation time. When a block uses JIT mode, debugging is disabled. During simulation, you cannot set a breakpoint. If you set a breakpoint before simulation begins, the software enables debugging. You no longer directly enable or disable debugging with Enable debugging/animation on the Simulation Target pane of the Configuration Parameters dialog box or menu option.

In previous releases, if you set the command-line parameter SFSIMEnableDebug, the software enabled debugging for the model. Now, setting this parameter prevents the block from using JIT mode. Do not set this parameter if you want to improve model update performance using JIT mode.

Some MATLAB Function blocks do not qualify for JIT mode, such as blocks that integrate custom C code. In these cases, the software defaults to MEX-file generation with debugging enabled. For optimal simulation performance for these blocks, turn off debugging by using this command.

sfc('coder_options', 'forceDebugOff', 1);

After you run this command, these blocks do not have debugging or run-time error checking.

Code generation for casts to and from types of variables declared using coder.opaque

For code generation, you can use the MATLAB cast function to cast a variable to or from a variable that is declared using coder.opaque. Use cast with coder.opaque only for numeric types.

To cast a variable declared by coder.opaque to a MATLAB type, you can use the B = cast(A,type) syntax. For example:

x = coder.opaque('size_t','0');
x1 = cast(x, 'int32');

You can also use the B = cast(A,'like',p) syntax. For example:

x = coder.opaque('size_t','0');
x1 = cast(x, 'like', int32(0));

To cast a MATLAB variable to the type of a variable declared by coder.opaque, you must use the B = cast(A,'like',p) syntax. For example:

x = int32(12);
x1 = coder.opaque('size_t', '0');
x2 = cast(x, 'like', x1));

Use cast with coder.opaque to generate the correct data types for:

  • Inputs to C/C++ functions that you call using coder.ceval.

  • Variables that you assign to outputs from C/C++ functions that you call using coder.ceval.

Without this casting, it is possible to receive compiler warnings during code generation.

Consider this MATLAB code:

yt = coder.opaque('size_t', '42');
yt = coder.ceval('foo');
y = cast(yt, 'int32');

  • coder.opaque declares that yt has C type size_t.

  • y = cast(yt, 'int32') converts yt to int32 and assigns the result to y.

Because y is a MATLAB numeric type, you can use y as you would normally use a variable in your MATLAB code.

The generated code looks like:

size_t yt= 42;
int32_T y;
y = (int32_T)yt;

It is possible that the explicit cast in the generated code prevents a compiler warning.

Improved recognition of compile-time constants

In previous releases, the code generation software recognized that structure fields or array elements were constant only when all fields or elements were constant. In R2015a, in some cases, the software can recognize constant fields or constant elements even when some structure fields or array elements are not constant.

For example, consider the following code. Field s.a is constant and field s.b is not constant:

function y = create_array(x)
s.a = 10;
s.b = x;
y = zeros(1, s.a);

In previous releases, the software did not recognize that field s.a was constant. In the generated code, if variable-sizing was enabled, y was a variable-size array. If variable-sizing was disabled, the code generation software reported an error. In R2015a, the software recognizes that s.a is a constant. y is a static row vector with 10 elements.

As a result of this improvement, you can use individual assignments to assign constant values to structure fields. For example:

function y = mystruct(x)
s.a = 3;
s.b = 4;
y = zeros(s.a,s.b);

In previous releases, the software recognized the constants only if you defined the complete structure using the struct function: For example:

function y = mystruct(x)
s = struct('a', 3, 'b', 4);
y = zeros(s.a,s.b);

In some cases, the code generation software cannot recognize constant structure fields or array elements. See Code Generation for Constants in Structures and Arrays.

Compatibility Considerations

The improved recognition of constant fields and elements can cause the following differences between code generated in R2015a and code generated in previous releases:

  • A function output can be more specific in R2015a than it was in previous releases. An output that was complex in previous releases can be real in R2015a. An array output that was variable-size in previous releases can be fixed-size in R2015a.

  • Some branches of code that are present in code generated using previous releases are eliminated from the generated code in R2015a.

Code generation for additional Image Processing Toolbox and Computer Vision System Toolbox functions

Computer Vision System Toolbox

  • opticalFlow

  • vision.DeployableVideoPlayer on Mac platform.

    In previous releases, vision.DeployableVideoPlayer supported code generation on Linux® and Windows® platforms. In R2015a, vision.DeployableVideoPlayer also supports code generation on a Mac platform.

See Computer Vision System Toolbox.

Code generation for additional Communications System Toolbox, DSP System Toolbox, and Phased Array System Toolbox System objects

Code generation for additional Statistics and Machine Learning Toolbox functions

Code generation for additional MATLAB functions

Code generation for additional MATLAB function options

Model Advisor

Multiple instances of advisors

Model Advisor infrastructure changes allow you to save analysis time. To prepare for advisor analysis, you can open and configure:

  • Different advisors on the same model

  • The same advisor on different models

However, you can run the analysis for only one advisor at time.

AdvisorsMore information

Model Advisor

Consulting the Model Advisor

Performance Advisor

How Performance Advisor Improves Simulation Performance

Upgrade Advisor

Consult the Upgrade Advisor

Model Reference Conversion Advisor

Convert a Subsystem to a Referenced Model

Code Generation Advisor – Available with Simulink Coder

High-Level Code Generation Objectives

Fixed-Point Advisor – Available with Fixed-Point Designer™

Fixed-Point Advisor

HDL Workflow Advisor – Available with HDL Coder

HDL Workflow Advisor

Simulink Code Inspector™ Compatibility Checker – Available with Simulink Code Inspector

Model Compatibility

Improved advisor startup performance

Model Advisor infrastructure changes have improved secondary startup performance of these advisors.

AdvisorsMore information

Model Advisor

Consulting the Model Advisor

Performance Advisor

How Performance Advisor Improves Simulation Performance

Upgrade Advisor

Consult the Upgrade Advisor

Model Reference Conversion Advisor

Convert a Subsystem to a Referenced Model

Code Generation Advisor – Available with Simulink Coder

High-Level Code Generation Objectives

Fixed-Point Advisor – Available with Fixed-Point Designer

Fixed-Point Advisor

HDL Workflow Advisor – Available with HDL Coder

HDL Workflow Advisor

Simulink Code Inspector Compatibility Checker – Available with Simulink Code Inspector

Model Compatibility

Model Advisor check input parameters retained for each instance of check

For Model Advisor checks with input parameters, instances of the check retain the input parameters that you enter. When you run the check, the results reflect the input parameter for that instance of the check. Previously, when you entered an input parameter for a check, all instances of the check were updated with the value you entered.

Model referencing checks in Model Advisor to reduce warning messages

The Model Advisor includes two new checks to reduce the number of warning messages during simulation and code generation. These checks replace the Configuration Parameters > Diagnostics > Model Referencing > Model configuration mismatch diagnostic, which generated many warning messages that you could safely ignore. For details, see Model referencing checks in Model Advisor to reduce warning messages in the "Component-Based Modeling" section of these release notes.

Compatibility Considerations

The Model configuration mismatch diagnostic no longer appears in the Configuration Parameters > Diagnostics > Model Referencing pane. Simulink ignores the setting of the corresponding ModelReferenceCSMismatchMessage parameter. For details, see Model referencing checks in Model Advisor to reduce warning messages in the "Component-Based Modeling" section of these release notes.

R2014b

New Features, Bug Fixes, Compatibility Considerations

Simulink Editor

Smart Editing Cues: Accelerate model building with just-in-time contextual prompts

The Simulink Editor provides several new model editing options that:

  • Allow you to edit a model from within the diagram, without opening separate dialog boxes from a menu

  • Provide editing options based on the context of your most recent editing operations

Add and Configure a Block without Leaving a Diagram

You can add a block to a model by typing a block name in a new Simulink Editor quick insert interface. You can perform a quick insert in several ways. For example, to add a Gain block and set the Gain parameter to 3, here is one approach:

  1. Left-click in an empty space in the diagram, near where you want to add the Gain block.

  2. Type "ga".

    A list of blocks beginning with "ga" appears.

  3. The Gain block appears first in the list, so just press Enter.

    A Gain block appears in the diagram.

  4. In the hot parameter edit box, enter a gain of 3.

The hot parameter edit box allows you to enter a value for one parameter per block that you add using the quick insert feature.

For more information, see Add Blocks Using Quick Insert.

Insert a Complementary Block

You can insert a complementary block for the following blocks from within the canvas.

  • GoTo and From

  • Data Store Read and Data Store Write

For example, to add a From block associated with GoTo block in a model, hover over the GoTo block

  1. Hover over the GoTo block.

  2. Click and drag the blue tear-off guide.

Perform Actions on a Marquee Selection

You can perform the following actions on a marquee selection (multiple selected objects in an area of a model), without leaving the canvas.

  • Create a subsystem

  • Create a triggered, enabled, or function-call subsystem

  • Comment or uncomment the selected blocks

To select an action, hover over the blue action button. For example, to create a subsystem from the selected blocks, click the Create Subsystem button.

Connect Aligned Blocks Using a Guide

When you align the ports of two blocks, blue guide lines appear. Release the mouse button. Some blue guide lines remain. You can click a remaining blue guide line to connect blocks.

Viewmarks: Save graphical views of a model for quick access to areas of interest

You can create and manage viewmarks, which are bookmarks to parts of a model. Use viewmarks to capture graphical views of a model or parts of a model. You can capture viewmarks for specific levels in a model hierarchy. You can also pan and zoom in a displayed system, to capture the specific portion of interest.

Some examples of ways you can use viewmarks include:

  • Navigate to different levels of complex models without opening multiple Simulink Editor tabs or windows.

  • Review model designs

  • Visually compare different versions of a model.

You can manage your viewmarks for all models in a single gallery of viewmarks, organized by model.

For more information, see Use Viewmarks to Save Views of Models.

Annotation Connectors: Associate annotations with blocks in models

You can add blue connector lines between an annotation and a block. The connector is similar to a callout, identifying the block that an annotation applies to. As you move the annotation or block to which the connector attaches, Simulink redraws the connector. For more information, see Add Lines to Connect Annotations to Blocks.

When you create an annotation, by default the annotation appears in the model. You can now configure an annotation so that you can choose to hide that annotation. This allows you to include annotations that provide additional information about a model without cluttering the model.

To configure an annotation so that you can hide it:

  1. Right-click the annotation.

  2. In the context menu, select Convert to Markup.

By default, all annotations appear in the model. To hide annotations that are converted to markup, select Display > Hide Markup.

R2014b includes two new set_param and get_param parameters relating to showing and hiding annotations:

  • MarkupType — specifies whether an annotation can be hidden ('markup') or always appears ('model')

  • ShowMarkupType — Specifies whether to display markup annotations ('on') or hide them ('off').

For more information, see Show or Hide Annotations.

Edit bar for quick annotation formatting

When you click in an annotation, the Simulink Editor now displays an annotation edit bar. Click an edit bar button to format an annotation without having to open a menu. Types of formatting you can do include:

  • Make text bold or italic

  • Enlarge or shrink the font size

  • Center text

Annotation table column and row resizing

In an annotation, you can interactively resize table columns or rows by dragging a table column or row border.

Reuse of annotation text formatting

You can copy the formatting from one piece of annotation text to other text in the same annotation, using Format Painter button in the annotation edit bar. For details, see Copy Formatting.

Annotation layering

You can specify whether an annotation appears in front of or behind other annotations. (Annotations always appear behind blocks.)

To display an annotation in front of another annotation, use the following steps.

  1. Do a marquee selection (bounding box) that includes the annotation that you want to appear in front.

  2. Select the Diagram > Arrange > Front menu option.

Access Diagnostic Viewer from status bar

When you update, simulate, or build a model, the status bar at the bottom of the Simulink Editor displays the total number of diagnostics generated. If these diagnostics are in the form of warnings or information, Simulink does not bring the Diagnostic Viewer into focus so that you can continue developing your model. When you are ready to diagnose warnings or view information, click the link displayed in the status bar to bring the Diagnostic Viewer into focus.

Printing to file

When you use the Print Model dialog box and select Print To File, the default file format is now PDF instead of the previous default of Postscript. Exporting to PDF generally makes it easier to share models with other people.

The default file name is now the name of the system you exported, which makes it easier to tell which system is in a file. Previously, Simulink generated a file name that did not reflect the system name.

Simulation Analysis and Performance

Fast Restart: Run consecutive simulations more quickly

Fast Restart is a new simulation workflow that eliminates the need for compiling a model repeatedly in iterative simulations. In this mode, the model compiles only in the first iteration. Simulink uses this compile information for successive runs, so there is no need to recompile. You can tune parameters or root-level inputs between runs as long as there are no structural changes to the model. This saves you time spent on recompiling and improves overall simulation efficiency.

Use Fast Restart to tune parameters in a model iteratively, calibrate a system for a desired response, or run multiple simulations in which the compile time is comparable to simulation time. For more information, see How Fast Restart Improves Iterative Simulations.

New Simulation Data Inspector: View live signal data and access visualization options such as data cursors

You can now view a signal in the Simulation Data Inspector during model simulation. This is especially helpful for workflows that involve debugging and optimizing a model. For more information, see Stream Data to the Simulation Data Inspector.

The Simulation Data Inspector now supports Simscape simulation output and includes new visualization options, such as data cursors, which help you inspect signal values in the Simulation Data Inspector plot.

Fixed Point Support for Conditional Breakpoints

Signals of fixed point data type now support conditional breakpoints based on the converted double value.

Quick Scan simulation in Performance Advisor for faster diagnosis

The Quick Scan feature in Performance Advisor helps you analyze a model quickly to deliver an approximate analysis of suboptimal conditions or settings in the model. Quick Scan does not require any preset conditions, and you can run it anytime. Using this feature, you can get a preview of potential performance improvement changes in a model without performing baseline measurement, multiple compilations, or simulations. See Perform a Quick Scan Diagnosis for more information.

Removal of warning when variable-step solver is selected for discrete models

When you simulate a discrete model with a variable-step solver, Simulink automatically switches the solver selection from Variable-step continuous (default) to Variable-step discrete. When doing so, Simulink no longer displays a warning about the switch, even if you have set Diagnostics > Automatic solver parameter selection to warning in the Model Configuration Parameters dialog box.

Block callbacks not evaluated in Rapid Accelerator mode with up-to-date check off

Previously, when you simulated a model in Rapid Accelerator mode with the RapidAcceleratorUpToDateCheck parameter set to off, Simulink evaluated the start and stop callbacks of the model and the blocks. Starting in R2014b, when the RapidAcceleratorUpToDateCheck parameter is set to off, Simulink evaluates only the model start and stop callbacks.

Functionality Being Removed or Changed

Functionality What Happens When You Use This Functionality? Use This Instead Compatibility Considerations
slupdateWarnsUse the Upgrade Advisor instead.slupdate will be removed in a future release. The slupdate command can only upgrade some parts of your model. Use the Upgrade Advisor instead. See Model Upgrades.

Improvements to Scope blocks and Scope viewers

Enhancements to viewing signals.

Scope blocks:

  • Allow scrolling of signals to the left

  • Supports fast restart

Floating Scope blocks:

  • New Log/Unlog Viewed Signals to Workspace button on the Scope Parameters > History pane to set the Log signal data check boxes for attached signals

  • Supports simulation stepping

  • Supports fast restart

  • Support for legends

  • Ability to change line properties, axes, and figure colors.

Scope Viewers:

  • Includes all the enhancements for Floating Scope blocks

  • Supports the Dataset format for the Signal Logging format parameter in the Configuration Parameters > Data Import/Export pane.

  • The functionality for the removed Floating Scope viewer is now included with Scope viewers.

Component-Based Modeling

Model Templates: Build models using design patterns that serve as starting points to solve common problems

Model templates enable reuse of settings and sharing of knowledge. Create models from templates to encourage best practices and take advantage of previous solutions to common problems. Instead of the blank canvas of a new model, select a template to help you get started.

Use built-in templates or create templates from models that you already configured for your environment or application.

For details, see Create a New Model.

Simulink Functions: Create and call functions across Simulink and Stateflow

The Simulink Function block serves as a starting point for implementing functions using Simulink blocks. Simulink Function responds to the Function Caller block or to a call from Stateflow using a provided function prototype.

The Function Caller block, using a provided function prototype, invokes a function implementation, such as the Simulink Function block, or a Stateflow exported chart function.

Interface Display: View and trace the input and output signals of a model or subsystem​​​

For Simulink models, the Interface feature helps you to understand and manage your model interfaces. You can start with the input and output connections at the edge of the model diagram and examine signal paths going in and coming out of a component. You can trace individual signals, buses, and elements of a bus to learn their uses in the model. The feature also displays characteristics of the inputs and outputs, such as dimensions, port data types, and sample times. Select Display > Interface in your Simulink model to turn on this display.

Model reference conversion enhancements

In R2014b, the Model Reference Conversion Advisor and the Simulink.SubSystem.convertToModelReference function provide new automatic fix options for converting a subsystem in a model that meets either of these conditions.

  • The model contains a Data Store Memory block that Data Store Read or Data Store Write blocks access across the subsystem boundaries.

  • The top model uses tunable parameters.

The Simulink.SubSystem.convertToModelReference function has a new PropagateSignalStorageClass argument. Set that argument to true to have the conversion propagate the signal storage class. For example:

open_system('sldemo_mdlref_conversion');
Simulink.SubSystem.convertToModelReference(gcb,'test_model',...
'PropagateSignalStorageClass',true)

Compatibility Considerations

The automatic fix for Data Store Memory blocks creates Simulink.Signal objects and redirects Data Store Read and Data Store Write blocks to access those signal objects. The automatic fix for tunable parameters creates Simulink.Parameter objects for tunable parameters.

The conversion process creates data. Conversion data that the top model and the new referenced model share is saved in the data dictionary, if the top model uses one. Otherwise, the data is saved in a MAT-file.

  • If the top model does not use a data dictionary, the conversion stores the data in a MAT-file whose name uses this format: <model_name>_conversion_data.mat.

    • If the model has callbacks or if you have scripts that rely on the previous variable names and locations, load the <model_name>_conversion_data.mat file before running the callbacks or scripts.

  • If the top model uses a data dictionary, the conversion action depends on the state of the data dictionary.

    • If the data dictionary does not need to be saved, the conversion stores the data in the data dictionary.

    • If the data dictionary needs to be saved, the conversion does not save the data. You need to save the data dictionary when the conversion is complete.

Include Simulink Models as Variant Choices

Previously, you could only include subsystems as variant choices inside a Variant Subsystem block. If you wanted to include a model as a variant choice, you had to first wrap the model inside a Subsystem block and then include the subsystem block as the variant choice.

In R2014b, you can include a Simulink model as a variant choice inside a Variant Subsystem block without wrapping the model inside a Subsystem block.

You cannot include a Model block that contains variants inside a Variant Subsystem block. When you attempt this inclusion, Simulink suggests converting the Model block into a Subsystem block.

For example, consider a model block called IntelligentController that has two variants: FuzzyLogicController and KalmanFilterController. If you add this block inside a Variant Subsystem block, Simulink converts the model into a subsystem containing two model blocks: one representing FuzzyLogicController and the other, KalmanFilterController.

Arithmetic and Bit-Wise Operators in Variant Condition Expressions

In R2014b, you can use arithmetic and bit-wise operators in variant condition expressions, provided the expressions evaluate to a Boolean value.

For a list of supported operators, see Operators and Operands in Variant Condition Expressions.

Export of chart-level functions in export-function models

In R2014b, you can export graphical functions in Stateflow charts residing in export-function models. For more information, see Export Stateflow Functions for Reuse.

Project and File Management

Block Dependencies in Impact Graph: Highlight the blocks affected by changes made to project files

Perform fine-grained dependency analysis using the Impact graph in Simulink Project. The Impact graph now displays which blocks have dependencies. For example, to find the impact of modifying a library, you can find design and test files dependencies. You can then expand the dependent files to see which subsystems have dependencies. You can view dependent blocks, models and libraries, and double-click to highlight the blocks in the models.

Other improvements in dependency analysis tools:

  • Impact graph items now have popups when you mouse over a file, so that you can read the text and expand files without needing to change the zoom.

  • Line routing in the graph is improved to reduce line crossings and make it easier to interpret large projects.

  • Dependency and Impact analysis views have new toolstrips with reorganized tools to fit common workflows. The toolstrips enable discovery of tools previously hidden in context menus.

  • You can now exclude external toolboxes from dependency analysis, which can avoid time-consuming analysis.

For details, see Perform Impact Analysis.

Identify modified or conflicted folder contents using source control summary status

In Simulink Project, folders now display rolled-up source control status. This makes it easier to locate changes in files, particularly conflicted files. You can hover over the source control status for a folder to view a tooltip displaying how many files inside are modified, conflicted, added or deleted.

Simplified file views in Simulink Project

In Simulink Project, the file views are simplified to combine the All files and Project Files nodes. You can find all files in the Files view, and use a filter if you only want to display files in the project. You can use drag and drop to add, move, and remove files from the project.

The source control and project information nodes are also combined to simplify the project tree.

For details of all these views, see Try Simulink Project Tools with the Airframe Project.

Simplified browsing and sharing of project templates

Simulink Project now discovers templates using the MATLAB path. This enables simpler browsing and sharing of templates. You no longer need to import templates or manage a separate template path. If a colleague emails you a template, you can use it by placing it in the current folder or elsewhere on the MATLAB path. The template manager has been removed. You can still access all your existing templates using the Add Template dialog when creating a project.

SVN and Git example Simulink Projects

Try out source control features using new SVN and Git example Simulink Projects:

sldemo_slproject_airframe_svn
sldemo_slproject_airframe_git
For details, see Try Simulink Project Tools with the Airframe Project.

Data Management

Root Import Mapping tool

The Root Import Mapping tool has been updated. In addition to a new user interface, the tool lets you:

  • Import signals from base workspace, MAT-files, and Microsoft® Excel (Windows systems only) files

  • Export signals

  • Visualize signals

  • Save and import scenarios

  • Create new scenarios

For more information, see Import and Map Root-Level Inport Data.

Compatibility Considerations

The Root Import Mapping tool no longer accepts data in the time expression format.

Minimize and maximize buttons for the Configuration Parameters dialog box

You can minimize and maximize the Configuration Parameters dialog box using buttons on the title bar.

Overflow diagnostics to distinguish between wrap and saturation

You can now separately control the diagnostics for overflows that wrap and overflows that saturate by setting each diagnostic to error, warning, or none. These controls simplify debugging models in which only one type overflow is of interest. For example, if you need to detect only overflows that wrap, in the Data Validity pane of the Configuration Parameters dialog box you can set Wrap on overflow to error or warning, and set Saturate on overflow to none.

Change in behavior of isequaln

Previously, when you used function isequaln to compare two Simulink data objects, the function compared only the handles of the two objects. This behavior was incorrect and did not conform to the intended behavior of isequaln in MATLAB. Consider the following example:

a = Simulink.Parameter;
b = Simulink.Parameter;
isequaln(a,b);
ans = false

Now, the behavior of isequaln has changed to conform to the behavior of isequaln in MATLAB. Now, isequaln compares two Simulink data objects by comparing their individual property values. Based on the above example, provided objects a and b have the same property values, the new result will be as follows:

a = Simulink.Parameter;
b = Simulink.Parameter;
isequaln(a,b);
ans = true

Compatibility Considerations

If you are using the isequaln function in your MATLAB code to compare Simulink data objects, check your code to ensure that it still works correctly.

Change in Simulink check for types derived from Simulink.IntEnumType

Previously, Simulink generated an error if any of the underlying values of a type derived from Simulink.IntEnumType did not fit on the emulation target. This check is defined by the configuration parameter TargetBitPerInt.

Now, Simulink generates an error if any of the underlying values of a type derived from Simulink.IntEnumType do not fit on the production target. This check is defined by the configuration parameter ProdBitPerInt.

Compatibility Considerations

Simulation errors can occur if any of the underlying values of types derived from Simulink.IntEnumType do not fit on your production target, even if those values previously fit on your emulation target.

Methods no longer inherited by Simulink enumerations

The base class Simulink.IntEnumType no longer defines these methods:

  • getDescription

  • getHeaderFile

  • getDataScope

  • addClassNameToEnumNames

You can define these methods in your enumeration classes, but classes derived from Simulink.IntEnumType no longer inherit these methods.

Previously, you called these inherited methods at the command prompt to query attributes of an enumerated type derived from Simulink.IntEnumType. For example, you called the method getDefaultValue to query the default enumeration member. Now, to query attributes of an enumerated type, you use the function Simulink.data.getEnumTypeInfo.

The table shows how to use Simulink.data.getEnumTypeInfo, instead of the methods, to query the attributes of an enumerated type BasicColors.

Previous method callNew function call
BasicColors.getDescription
Simulink.data.getEnumTypeInfo(...
'BasicColors','Description')
BasicColors.getHeaderFile
Simulink.data.getEnumTypeInfo(...
'BasicColors','HeaderFile')
BasicColors.getDataScope
Simulink.data.getEnumTypeInfo(...
'BasicColors','DataScope')
BasicColors.addClassNameToEnumNames
Simulink.data.getEnumTypeInfo(...
'BasicColors','AddClassNameToEnumNames')

Compatibility Considerations

If you run MATLAB code that uses these previously inherited methods without overriding them, MATLAB returns errors.

However, code that overrides these methods, as described in Customize Simulink Enumeration, is unaffected.

Connection to Educational Hardware

More Arduino Support: Run your model on Arduino Leonardo, Mega ADK, Mini, Fio, Pro, Micro and Esplora boards

Updates to Simulink Support Package for Arduino Hardware: You can run your model on Arduino Leonardo, Mega ADK, Mini, Fio, Pro, Micro, and Esplora boards.

Documentation installation with hardware support package

Starting in R2014b, each hardware support package installs with its own documentation. See Simulink Supported Hardware for a list of support packages available for Simulink, with links to documentation.

Signal Management

Signal name inheritance from bus object elements

For a Bus Creator block that specifies a bus object, you can now have bus signal names inherit signal names from the corresponding element names in the bus object. To inherit signal names from bus element names, clear the new Override bus signal names from inputs check box. This approach:

  • Enforces strong data typing.

  • Avoids your having to enter a signal name multiple times. Without this option, you need to enter the signal names in the bus object and in the model, which can lead to accidentally creating signal name mismatches.

  • Supports the array of buses requirement to have consistent signal names across array elements.

The Bus Creator block parameters dialog box has been reorganized to group related parameters. For details, see the Bus Creator block reference page.

Compatibility Considerations

In R2014b, if you open a model created before R2014b that uses a bus object for the output data type, clearing the Override bus signal names from inputs parameter might require you to change the model because:

  • A signal name in a downstream Bus Selector or Bus Assignment block might no longer be the same.

    Change any selected signal names in the Bus Selector or Bus Assignment block dialog boxes that do not match the corresponding bus object element names.

  • Signal names in signal logging data might change.

    Update scripts to reflect signal logging signal names that match the corresponding bus object names.

​Faster and more flexible Simulink.Bus.createMATLABStruct function

If you use the Simulink.Bus.createMATLABStruct function repeatedly for the same model (for example, in a loop in a script), you can now improve performance by avoiding multiple model compilations. For improved speed, put the model in compile before using the function multiple times.

Also, you can now use a cell array of bus object names as an input argument for the function.

Block Enhancements

Nearest interpolation method available for n-D Lookup Table Block

The 1-D Lookup Table, 2-D Lookup Table, and n-D Lookup Table blocks have the option to select Nearest for interpolation methods.

MATLAB System block updates

The MATLAB System block:

Level-1 MATLAB S-Functions

Support for Level-1 MATLAB S-Functions will be removed in a future release.

Compatibility Considerations

For information on alternatives to creating custom blocks, see Comparison of Custom Block Functionality.

Unfiltered-derivative option in discrete-time PID Controller blocks

You can now specify an unfiltered derivative term in the discrete-time PID Controller and PID Controller (2DOF) blocks. Previously, these blocks required a finite derivative filter constant on the derivative term.

To specify an unfiltered derivative, in the Main pain of the block dialog box, uncheck Use filtered derivative. Unchecking this option replaces the derivative filter with a Discrete Derivative block. The option is checked by default for compatibility with previous versions.

MATLAB Function Blocks

Code generation for additional Image Processing Toolbox and Computer Vision System Toolbox functions

Computer Vision System Toolbox

vision.DeployableVideoPlayer on Linux.

For the list of Computer Vision System Toolbox functions supported for code generation, see Computer Vision System Toolbox.

Code generation for additional Communications System Toolbox and DSP System Toolbox functions and System objects

Communications System Toolbox

For the list of Communications System Toolbox™ functions supported for code generation, see Communications System Toolbox.

DSP System Toolbox

For the list of DSP System Toolbox functions and System objects supported for code generation, see DSP System Toolbox.

Code generation for ode23 and ode45 ordinary differential equation solvers in MATLAB

Code generation for additional MATLAB functions

Data and File Management in MATLAB

See Data and File Management in MATLAB.

String Functions in MATLAB

str2double

See String Functions in MATLAB.

Code generation for additional MATLAB function options

  • 'vector' and 'matrix' eigenvalue options for eig

  • All output class options for sum and prod

  • All output class options for mean except 'native' for integer types

  • Multidimensional array support for flipud, fliplr, and rot90

  • Dimension to operate along option for circshift

See Functions and Objects Supported for C and C++ Code Generation — Alphabetical List.

Code generation for enumerated types based on built-in MATLAB integer types

In previous releases, enumerated types used in MATLAB Function blocks were based on the Simulink.IntEnumType class. In R2014b, you can also base an enumerated type on one of the following built-in MATLAB integer data types:

  • int8

  • uint8

  • int16

  • uint16

  • int32

You can use the base type to control the size of the enumerated type in generated C and C++ code. You can choose a base type to:

  • Represent an enumerated type as a fixed-size integer that is portable to different targets.

  • Reduce memory usage.

  • Interface to legacy code.

  • Match company standards.

The base type determines the representation of the enumerated types in generated C and C++ code. For the base type Simulink.IntEnumType, the code generation software generates a C enumeration type. For example:

typedef enum {
  GREEN = 1,                          
  RED
} LEDcolor;
For the built-in integer base types, the code generation software generates a typedef statement for the enumerated type and #define statements for the enumerated values. For example:
typedef int16_T LEDcolor;

#define GREEN                          ((LEDcolor)1)            
#define RED                            ((LEDcolor)2)

Code generation for function handles in structures

You can now generate code for structures containing fields that are function handles. See Function Handle Definition for Code Generation.

Collapsed list for inherited properties in code generation report

The code generation report displays inherited object properties on the Variables tab. In R2014b, the list of inherited properties is collapsed by default.

Model Advisor

New check for Unit Delay and Zero-Order Hold blocks that perform rate transition

A new check in Model Advisor and Upgrade Advisor identifies Unit Delay and Zero-Order Hold blocks that are used for rate transition between input and output signals. The check prompts you to replace these blocks with actual Rate Transition blocks. The replacement provides accurate information about block transfer rates and enables traceability. For more information, see Check Unit Delay and Zero-Order Hold blocks for rate transition.

Highlighted configuration parameters from Model Advisor reports

When you click a link to a configuration parameter from a Model Advisor report, the parameter is highlighted in the Configuration Parameters dialog box.

R2014a

New Features, Bug Fixes, Compatibility Considerations

Simulink Editor

Annotations with rich text, graphics, and hyperlinks

In addition to plain text and text formatted with TeX, annotations can now include:

  • Rich text, which gives you the ability to format text and to add tables and lists, as you would using Microsoft Word

  • Images, either by copying and pasting or by importing a graphics file

  • Hyperlinks to Web pages or other documents

Diagnostic Viewer to collect information, warnings, and error messages

In addition to displaying errors and warnings generated during simulation, the Diagnostic Viewer now displays information at the time of update diagram and build. The messages are displayed in a hierarchical structure within tabs for each model. For details, see Manage Errors and Warnings

Compatibility Considerations

The diary function does not intercept messages, errors, warning, and information transmitted to the Diagnostic Viewer.

Therefore, if you use the diary function to log messages, errors, warnings, and information generated during model build and simulation, replace instances of diary with sldiagviewer.diary in one of these ways.

  • sldiagviewer.diary('filename','encoding'), where both filename and encoding are optional arguments.

    • The default value for filename is diary.txt in the current folder.

    • A valid value for encoding is UTF-8. If you do not specify a value, the default encoding value is set.

    • The command toggles the logging state of the specified file.

    • You can keep multiple log files active simultaneously.

  • sldiagviewer.diary('on') and sldiagviewer.diary('off') toggle the logging state of the file specified in the last executed sldiagviewer.diary command.

    If no file was specified in the last command, the logging state of the default file is toggled.

Option to bring contents of a hierarchical subsystem into the parent subsystem with one click

You can now expand subsystem contents to flatten the model hierarchy. Expanding a subsystem is useful when refactoring a model. Flattening a model hierarchy can be the end result, or just one step in refactoring. For example, you could pull a set of blocks up to the parent system by expanding the subsystem, deselect the blocks that you want to leave in the parent, and then create a subsystem from the remaining selected blocks.

For details, see Expand Subsystem Contents.

Support for native OS touch gestures, such as pinch-to-zoom and panning

MathWorks® supports the use of multitouch gestures for panning and zooming on the Microsoft Windows with a Windows 7 certified or Windows 8 certified touch display.

  • Zoom by spreading two fingers.

  • Zoom in by pinching two fingers together.

  • Pan by dragging two fingers.

Other supported Simulink platforms that also support multitouch gestures might also support pan and zoom gestures, but MathWorks has not fully tested those platforms.

Operating system print options for models

The Print Model dialog box includes a Print using system dialog button that opens the print dialog box for your operating system. The operating system print dialog box provides printing options for models in addition to those that the Print Model dialog box provides. For example, you can use the operating system print dialog box for double-sided printing, color printing (if your print driver supports color printing), and nonstandard paper sizes. For details, see Specify the Page Layout and Print Job.

Preference for line crossing style

By default, straight signal lines that cross each other but are not connected display a slight gap before and after the vertical line where it intersects the horizontal line. You can change the line crossing style to line hops or solid lines. Use Simulink Preferences > Editor Defaults > Line crossing style. For details, see Line crossing style.

Scalable graphics output to clipboard for Macintosh

On Macintosh platforms, when you copy a model to the clipboard, Simulink now saves the model in a scalable format, in addition to a bitmap format. When you paste from the clipboard to an application, that application selects the format that best meets its requirements. For details, see Export Models to Third-Party Applications.

Sliders, dials, and spinboxes available as parameter controls in masks

In this release, Simulink provides the capability to control mask parameters through three additional widgets: sliders, dials, and spinboxes. For details, see Parameters & Dialog Pane.

Component-Based Modeling

Option to choose default variants

In R2014a, you can specify a default variant choice. If no other variant is active, Simulink selects and uses the default choice.

For more information, see Set Default Variant.

Option to choose variants that differ in number of input and output ports

In this release, variant subsystems can have different numbers of inports and outports, provided that they satisfy the following conditions:

  • The inport names are a subset of the parent variant subsystem's inport names.

  • The outport names are a subset of the parent variant subsystem's outport names.

During simulation, Simulink disables the inactive ports in a variant subsystem block.

Advisor-based workflow for converting subsystems to Model blocks

The new Model Reference Conversion Advisor simplifies the process of converting a subsystem to a referenced model. The advisor includes Fix buttons to automatically update the model for a successful conversion. After converting the subsystem, by default the advisor automatically updates the model, removing the Subsystem block and adding a Model block that references the newly created referenced model. For details, see Convert a Subsystem to a Referenced Model.

The Simulink.SubSystem.convertToModelReference command now has a UseConversionAdvisor argument, which opens the Model Reference Conversion Advisor, and an AutoFix argument, which automatically fixes several kinds of conversion issues.

Single-model workflow for algorithm partitioning and targeting of multicore processors and FPGAs

You can use the concurrent execution dialog box to configure a model for concurrent execution on heterogeneous targets.

A new example has been added. Navigate to Simulink > Examples > Modeling Features > Modeling Concurrency > Modeling Concurrent Execution on Multicore Targets.

For a list of supported heterogeneous targets, see Supported Heterogeneous Targets.

Easier MATLAB System block creation via autocompletion and browsing for System object names

The MATLAB System block dialog box has new browse and autocompletion capabilities to specify the System object name. It also allows creation of new System objects from templates.

Improved algebraic loop handling and reduced data copies with the Bus Selector block

The Bus Selector block processing now reduces:

  • Artificial algebraic loops involving nonvirtual buses

  • Data copies during bus element selection

  • The number of lines of generated code

Compatibility Considerations

The Bus Selector block performance enhancements result in these compatibility considerations.

  • Attaching a non-auto storage class at output of Bus Selector causes an error.

    Workaround: Insert a Signal Conversion block after the Bus Selector block, and specify the storage class on the output of the Signal Conversion block.

  • In model reference Accelerator mode, Bus Selector output signal logging using the ModelDataLogs format causes an error.

    To work around this issue, change the signal logging format to Dataset or insert a Signal Conversion block after the Bus Selector block and log the Signal Conversion block output (instead of the Bus Selector block output).

  • The priority specified on a Bus Selector block is ignored.

  • A Bus Selector block connected to root Outport block in referenced model honors the Invalid root Inport/Outport block connection diagnostic. This is an issue only if the diagnostic is set to Error or Warning. There is no impact on generated code.

    Workaround: Insert a Signal Conversion block after the Bus Selector block.

Faster response time when opening bus routing block dialog boxes and propagating signal labels

Opening the Bus Creator, Bus Selector, or Bus Assignment block dialog box is faster. Propagation of signal labels is also faster.

Usability enhancements to configure a model for concurrent execution on a target

Modeling for concurrent execution has the following enhancements:

  • You can use MATLAB System blocks at the top level of a model to model parallel computations. For more information, see Model Parallel Computations.

  • You can clear the Solver > Allow tasks to execute concurrently on target check box in the Configuration Parameters dialog for a referenced model. In this case, Simulink will not report a parameter mismatch for the model hierarchy. When this option is cleared, any Rate Transition blocks in the referenced model may have the Ensure deterministic data transfer (maximum delay) option selected.

  • Simulink now handles the data transfer for the rate transitions occurring at the top level of a model. For more information, see Configure Your Model.

  • There are new function to work with models for concurrent execution. Use these functions instead of the command-line interface from previous releases. For more information, see Command-Line Interface for Concurrent Execution.

Compatibility Considerations

Use the new functions instead of the following:

  • Simulink.SoftwareTarget.concurrentExecution

  • Simulink.SoftwareTarget.AperiodicTrigger

  • Simulink.SoftwareTarget.PeriodicTrigger

  • Simulink.SoftwareTarget.PosixSignalHandler

  • Simulink.SoftwareTarget.Task

  • Simulink.SoftwareTarget.TaskConfiguration

  • Simulink.SoftwareTarget.WindowsEventHandler

  • Simulink.SoftwareTarget.Trigger

Default setting of Underspecified initialization detection diagnostic is Simplified

Simplified initialization mode is the new default mode of initialization for all models created in R2014a. Simplified initialization mode has improved output consistency over classic initialization mode. For more information, see Conditional Subsystem Output Initialization.

However, any new configuration sets created using Simulink.ConfigSet still use classic initialization mode.

Discrete-Time Integrator block has dialog box changes for initialization

The Use Initial value as initial and reset value for parameter of the Discrete-Time Integrator block has been replaced by the Initial Condition Setting parameter. The new parameter provides options to carry out either output or state initialization. An additional option of Compatibility does exist for this parameter, but use it only for compatibility purposes.

System objects Propagates mixin methods

Four new methods have been added to the Propagates mixin class. You use this mixin when creating a new kind of System object for use in the MATLAB System block in Simulink. You use these methods to query the input and specify the output of a System object.

Simulation Analysis and Performance

Reduced setup and build time for Model blocks when using Rapid Accelerator mode

Building a model that uses model referencing in Rapid Accelerator mode is faster than in previous releases, because Simulink reuses the simulation target.

If you have Parallel Computing Toolbox™, you can enhance Rapid Accelerator build speed further by using parallel builds.

In R2014a, Simulink stores Rapid Accelerator build artifacts in the simulation cache folder instead of the code generation folder. This change avoids cluttering the code generation folder with simulation artifacts.

Compatibility Considerations

  • If you have a script that relies on Rapid Accelerator build artifacts being stored in the code generation folder, the R2014a change to the artifact storage location requires you to update that script only if you specify two different folders for the Simulink preferences Simulation cache folder and Code generation folder.

  • In R2014a, the Upgrade Advisor checks that S-functions work properly in top model Rapid Accelerator simulation. The advisor identifies and assists you with updating S-functions that meet all of the following conditions:

    • The S-function was created in R2013b or earlier, using either the S-Function Builder block or the Legacy Code Tool.

    • The S-function uses a bus signal as an input or output.

    • Simulink has added padding to that bus signal.

    Before you simulate such S-functions in a top model in Rapid Accelerator mode, regenerate the S-functions with the tool used for creating them. The Model Advisor automatically regenerates as many of these S-functions as it can and identifies any other S-functions that you must regenerate.

Performance Advisor checks that validate overall performance improvement for all suggested changes and set code generation option for MATLAB System block

  • Performance Advisor validates the overall performance improvement to your model using a final validation check. If performance is worse than baseline, Performance Advisor discards all changes and loads the original model. For more information, see Final Validation.

  • Performance Advisor uses the Check MATLAB System block simulation mode check to identify which MATLAB System blocks can generate code and changes the Simulate using parameter value to Code generation where possible. For more information, see Check MATLAB System block simulation mode.

Improved navigation of the Performance Advisor report

For improved navigation and readability, in the Performance Advisor HTML report, you can:

  • Filter the report to display results for checks that pass, warn, or fail.

  • Display check results based on a keyword search.

  • Quickly navigate to sections of the report using a navigation pane of the contents.

  • Expand and collapse content in the check results.

For more information, see Use Performance Advisor Reports.

Block behavior for asynchronous initiator with constant sample time

In the simulation target workflow, Simulink displays a warning for an asynchronous initiator with constant sample time. To avoid the warning, set the sample time parameter of the asynchronous initiator to inherited. This change in sample time parameter does not affect the code generation workflow.

Global setting for validation of checks in Performance Advisor

You can enable validation for all selected checks in Performance Advisor using a global setting. Previously, you could only enable validation for checks in Performance Advisor individually. For more information, see Select Validation Actions for the Advice.

Guided setup in Performance Advisor

The user interface in Performance Advisor has been enhanced with a guided setup and workflow. The interface helps you to follow the workflow in Performance Advisor and also select settings required for performance optimization runs. For more information, see Prepare a Model for Performance Advisor.

Project and File Management

Branching support through Git source control

Git integration with Simulink Project provides distributed source control with support for creating and merging branches and working offline. You can manage your models and source code using Git within Simulink Project.

For details, see Set Up Git Source Control.

    Tip   If you want to add version control to your project files without sharing with another user, you can create a local Git repository in your sandbox with four clicks. For details, see Add a Project to Git Source Control.

Comparison of project dependency analysis results

You can compare a Simulink Project impact analysis graph with a previously saved result of dependency analysis. This creates an interactive report you can use to investigate how the structure of project dependencies has changed.

Impact graph layout algorithm improved for easier identification of top models and their dependencies

Improved hierarchical layout algorithm for the Simulink Project Impact graph makes it easier to identify top models, now always on the left, and their dependencies, on the right. Graph layout is repeatable so the top model is always in the same place if you run dependency analysis multiple times. Graph performance is also faster. Dependencies are layered to vertically line up all files referenced by the same file and minimize layer crossings. These layers make it easier to identify dependencies at the same level. This makes it easier to see connections between a top model and its dependencies.

For details, see Perform Impact Analysis.

Impact analysis example for finding and running impacted tests

The sldemo_slproject_impact example shows how to perform impact analysis in Simulink Project to find and run impacted tests to validate a change. You can search for dependencies of modified files to identify the tests you need to run. You can run a batch processing function on the files found by impact analysis and examine the results in Simulink Project.

Performance improvements for common scripting operations such as adding and removing files and labels

Common scripting operations for programmatically adding and removing files and file labels in a Simulink Project are now faster. For example, adding a label to 100 files is up to 40 times faster. Performance improvement depends on the project size.

Conflict resolution tools to extract conflict markers

Source control tools can insert conflict markers in files. Simulink Project can identify conflict markers and offer to extract them and compare the files causing the conflict. You can then decide how to resolve the conflict.

For details, see Resolve Conflicts.

Updated Power Window Example

The Power Window Control Project example has been updated to take advantage of design concepts such as:

  • Simulink Projects

  • Referenced models

  • Variant subsystems

For more information, see Power Window Case Study.

Data Management

Data dictionary for defining and managing design data associated with models

In R2014a, Simulink provides the ability to store, edit, and access design data using a data dictionary, which functions as a persistent repository of design data that your model uses.

Rapid Accelerator mode signal logging enhanced to avoid rebuilds and to support buses and referenced models

In Rapid Accelerator mode, you can now log:

  • Bus signals (including virtual, nonvirtual, and array of buses signals)

  • Signals in referenced models

Also, in Rapid Accelerator mode, no rebuild occurs when you change:

  • The Configuration Parameters > Data Import/Export > Signal logging parameter

  • Any settings using the Signal Logging Selector

Simplified tuning of all parameters in referenced models

This release simplifies the way Simulink considers the InlineParameters option when it is set to Off. You can perform the following operations:

  • Tune all block parameters in your model during simulation, either through the parameters themselves or through the tunable variables that they reference.

  • Preserve the mapping between a block parameter and a variable in generated code even when the block parameter does not reference any tunable variables.

  • Retain the mapping between tunable workspace variables and variables in generated code, irrespective of the InlineParameters setting.

  • Set the value of InlineParameters to Off for model references.

These behaviors are consistent across models containing reusable subsystems and reference models.

The simplified behavior enhances the generated code and provides improved mapping between a block parameter and a variable in generated code.

Block parameter expressionCode generated previouslyCode generated in R2014a
Expressions referencing global variables (e.g., K+1)Variable name is not preserved. Block parameter name is preserved.
struct Parameters_model_ {
  real_T Gain_Gain; // Expression: K+1
}
y = model_P.Gain_Gain*u;
Expression is considered tunable. Variable name is preserved in code and is tunable.
real_T K = 2.0;
y = (K+1)*u;
Expressions referencing mask parameters for nonreusable subsystems (e.g., MP*3), the value of MP being a nontunable expression.Variable name is not preserved. Block parameter name is preserved.
struct Parameters_model_ {
  real_T Gain_Gain; // Expression: MP*3
}
y = model_P.Gain_Gain*u;
Expression is considered tunable. Variable name is substituted by parameter value.
struct Parameters_model_ {
  real_T Subsystem_MP; 
}
y = (model_P.Subsystem_MP * 3) * u;
Expressions referencing model arguments (resp. mask parameters) for referenced models (resp. reusable subsystems) (e.g., Arg+1)Variable name is not preserved. Block parameter name is preserved.
struct Subsystem {
  Gain_Gain; // Expression: Arg+1
}
y = model_P.Subsystem1.Gain_Gain*u;
Variable name is preserved as an argument name.
subsystem(y, u, rtp_Arg) {
  y = (rtp_Arg+1)*u;
}

Simulink.findVars supported in referenced models

In this release, Simulink provides the ability to search model reference hierarchies for variables that are used or not used.

See Simulink.findVars for information on how to run these searches from the command-line.

Saving workspace variables and their values to a MATLAB script

In a future release, Simulink will not support Simulink.saveVars, which provides the ability to save workspace variables to a MATLAB script.

Instead, you can use the MATLAB function matlab.io.saveVariablesToScript to perform this operation from the command line.

Compatibility Considerations

If your scripts contain references to the function Simulink.saveVars, replace these references with matlab.io.saveVariablesToScript.

Frame-based signals in the To Workspace block

In the To Workspace block parameters dialog box, if you set Save format to either Array or Structure, you can set the new Save 2-D signals as parameter. By default, this new parameter is set for sample-based signals. To have the To Workspace block treat the input signal as a frame-based signal, change the setting to 2-D array (concatenate along first dimension).

Use this new To Workspace block parameter to treat an input signal to the block as a frame-based signal. This method of having Simulink treat an input signal as frame-based configures the model to work in future releases, when Simulink will no longer support using a signal property to specify that a signal is frame-based.

For information about frame-based signals, in the DSP System Toolbox documentation, see Frame-Based Processing.

Compatibility Considerations

Before R2014a, if you added a To Workspace block to a model, and you set Save format to either Array or Structure, you did not need to change any block parameter settings to handle frame-based signals.

In R2014a, in addition to setting Save format to either Array or Structure, you need to set the new Save 2-D signals as parameter to 2-D array (concatenate along first dimension).

If you open a model created before R2014a that inputs a frame-based signal to a To Workspace block, Simulink sets the Save 2-D signals as parameter to Inherit from input (this choice will be removed - see release notes). When you simulate the model, Simulink displays a warning, with a link to the Upgrade Advisor, which you can use to update your model to use the new frame-based signal handling approach (automatically setting Save 2-D signals as to 2-D array (concatenate along first dimension).

Simulation mode consistency for Data Import/Export pane output options parameter

The behavior for the Configuration Parameters > Data Import/Export > Output options parameter value of Produce specified output only is now consistent for Rapid Accelerator, Accelerator, and Normal mode. In all three simulation modes, this setting results in automatically generating output signal data for variable-step solvers for the start and stop times, as well as for the times that the user specifies.

Compatibility Considerations

Prior to R2014a, in Rapid Accelerator mode the Produce specified output only setting only generated data for the specified times, and did not automatically generate data for the start and stop times.

You need to update scripts that rely on:

  • Indexing that assumes that the first generated value is the first data value that you specify using the Produce specified output only setting

  • The number of the data points

Dimension mismatch handling for root Inport blocks improved

For the input and output of a root Inport block, Simulink no longer distinguishes between a dimension of 1 and a dimension that is a vector of ones.

For example, Simulink no longer reports an error when both of these conditions apply:

  • Input data for a root Inport block includes an element whose dimension is [1x1].

  • The root Inport block has as its data type for output a bus object whose corresponding element has a dimension of [1].

Compatibility Considerations

Before R2014a, Simulink reported an error for this kind of dimension mismatches. If you have tests that rely on Simulink reporting an error, you need to modify the tests to identify such mismatches explicitly.

Simulink.Bus.createObject support for structures of timeseries objects

You can use the Simulink.Bus.createObject function to create bus objects from a structure of MATLAB timeseries objects. This facilitates importing logged signal data.

Signal logging override for model reference variants

You can override programmatically a subset of signals for model reference variant systems, including:

  • Model reference variants

  • Model blocks that contain a Subsystem Variant block or model reference variant

To log a subset of signals for these model reference variant systems, set the SignalLoggingSaveFormat parameter to Dataset. For details, see Override Signal Logging Settings from MATLAB.

Improved To Workspace block default for fixed-point data

The block parameter Log fixed-point data as fi object is now enabled by default for the To Workspace block in the Simulink library. This causes Simulink to log data to the To Workspace block in a data format designed for fixed-point data.

Compatibility Considerations

You need to update any scripts that:

  • Insert from the Simulink library a To Workspace block that logs fixed-point data

  • Rely on the Log fixed-point data as fi object parameter not being enabled (which results in logging fixed-point data as doubles)

Legacy Code Tool support for 2–D row-major matrix

When you use the legacy_code function, you can now specify the automatic conversion of a matrix between a 2-D column-major format and a row-major format. Use the convert2DMatrixToRowMajor S-function option. The 2-D column-major format is used by MATLAB, Simulink, and the generated code. The row-major format is used by C. By default, the value is false (0).

Model Explorer property name filtering refined

In the Model Explorer Filter Contents edit box, when you enter a property name without specifying a value (for example, BlockType:), the Contents pane displays only those objects that have that property.

Connection to Educational Hardware

Support for Arduino Due hardware

You can use the Arduino Due support package independently of the Arduino support package for Arduino Uno, Arduino Mega 2560, and Arduino Nano hardware. The Arduino Due support package shares the common block library with the Arduino Support package including the Ethernet and the WiFi blocks. The target hardware for this support package is a 32–bit ARM architecture-based microcontroller.

To use this support package, install Arduino Due support package as follows:

  1. In the Command Window, enter supportPackageInstaller.

  2. Using supportPackageInstaller, install the Arduino Due support package.

Support for Arduino WiFi Shield hardware

You can use the Arduino WiFi Shield with the Simulink Support Package for Arduino Hardware to connect to wireless networks. The block library for the Arduino WiFi shield hardware includes WiFi TCP/IP and WiFi UDP blocks that enable you to design wireless communication in embedded systems. The WiFi shield supports wireless external mode simulation via TCP/IP.

The block library for the Arduino WiFi Shield hardware includes:

  • Arduino WiFi TCP/IP Send and Arduino WiFi TCP/IP Receive blocks that enable TCP/IP based wireless communication.

  • Arduino WiFi UDP Send and Arduino WiFi UDP Receive blocks that enable UDP based wireless communication.

To install or update this support package, perform the steps described in Install Support for Arduino Hardware.

For more information, see Arduino Hardware

Support for LEGO MINDSTORMS EV3 hardware

You can run Simulink models on LEGO MINDSTORMS EV3 hardware. You can also tune parameter values in the model, and receive data from the model, while it is running on LEGO MINDSTORMS EV3 hardware.

Use the Simulink Support Package for LEGO MINDSTORMS EV3 Hardware block library to access LEGO MINDSTORMS EV3 peripherals:

To install or update this support package, perform the steps described in Install Support for LEGO MINDSTORMS EV3 Hardware.

For more information, see LEGO MINDSTORMS EV3 Hardware.

Updates to support for LEGO MINDSTORMS NXT hardware

You can use the dGPS Sensor from Dexter Industries with the Simulink Support Package for LEGO MINDSTORMS NXT Hardware. Use the GPS Sensor block to measure the latitude and longitude of your current position, or get the distance and angle from your current position to a destination latitude and longitude.

To install or update this support package, perform the steps described in Install Support for LEGO MINDSTORMS NXT Hardware.

For more information, see LEGO MINDSTORMS NXT Hardware.

Support for Samsung GALAXY Android devices

You can run Simulink models on the Samsung GALAXY® S4 and Tab 2 10.1 devices. You can also tune parameter values in the model, and receive data from the model, while it is running on Samsung GALAXY S4 and Tab 2 10.1 devices.

Use the Simulink Support Package for Samsung GALAXY Android Devices block library to access the Samsung GALAXY Android™ hardware:

To install or update this support package, perform the steps described in Install Support for Samsung GALAXY Android Devices.

Block Enhancements

Enumerated data types in the Direct Lookup Table (n-D) block

The Direct Lookup Table (n-D) block now supports enumerated data types for its index and table data values.

Improved performance and code readability in linear search algorithm for Prelookup and n-D Lookup Table blocks

The Prelookup and n-D Lookup Table blocks have an improved linear search algorithm which improves performance and code readability.

System object file templates

The MATLAB System block has new templates to help create System objects.

Relay block output of fixed-in-minor-step continuous signal for continuous input

The Relay block now delivers fixed-in-minor-step continuous signals for continuous input. Previously, the Relay block output signal was a continuous output for a continuous input. The new sample time represents the behavior of the block more accurately.

MATLAB Function Blocks

Generating Simulation Target typedefs for imported bus and enumerated data types

You can configure Simulink to generate typedefs for imported bus and enumerated data types or to use typedefs you provide in a header file. In the Simulation Target pane of the Configuration Parameters dialog box, use the Generate typedefs for imported bus and enumeration types check box. This setting applies to model simulation for MATLAB Function blocks. For more information see Simulation Target Pane: General.

Complex data types in data stores

You can now access complex data types in Data Store Memory blocks and Simulink.Signal objects using MATLAB Function blocks.

Unicode character support for MATLAB Function block names

You can use international characters for MATLAB Function block names in the Simulink Editor.

Support for int64 and uint64 data types in MATLAB Function blocks

You can now use int64 and uint64 data types in MATLAB code inside MATLAB Function blocks. You cannot use int64 or uint64 types for input or output signals to MATLAB Function blocks.

Streamlined MEX compiler setup and improved troubleshooting

You no longer have to choose a compiler using mex -setup. mex automatically locates and uses a supported installed compiler. You can use mex -setup to change the default compiler. See Changing Default Compiler.

Code generation for additional Signal Processing Toolbox, Communications System Toolbox, and DSP System Toolbox functions and System objects

Code generation for MATLAB fminsearch optimization function, additional interpolation functions, and additional interp1 and interp2 interpolation methods

You can generate code for the interp1 function 'spline' and 'v5cubic' interpolation methods.

You can generate code for the interp2 function 'spline' and 'cubic' methods.

You can generate code for these interpolation functions:

You can generate code for these optimization functions:

Code generation for fread function

You can now generate code for the fread function.

Enhanced code generation for switch statements

Code generation now supports:

  • Switch expressions and case expressions that are noninteger numbers, nonconstant strings, variable-size strings, or empty matrices

  • Case expressions with mixed types and sizes

If all case expressions are scalar integer values, the code generation software generates a C switch statement. At run time, if the switch value is not an integer, the code generation software generates an error.

When the case expressions contain noninteger or nonscalar values, the code generation software generates C if statements in place of a C switch statement.

Code generation for value classes with set.prop methods

You can now generate code for value classes that have set.prop methods.

Code generation error for properties that use AbortSet attribute

Previously, when the current and new property values were equal, the generated code set the property value and called the set property method regardless of the value of the AbortSet attribute. When the AbortSet attribute was true, the generated-code behavior differed from the MATLAB behavior.

In R2014a, the code generation software generates an error if your code has properties that use the AbortSet attribute.

Modeling Guidelines

Model Advisor

Improved navigation of the Model Advisor report, including a navigation pane, collapsible content, and filters based on check status

For improved navigation and readability, the Model Advisor HTML report allows you to:

  • Filter the report to display results for checks that pass, warn, or fail.

  • Display check results based on a keyword search.

  • Quickly navigate to sections of the report using a table-of-contents navigation pane.

  • Expand and collapse content in the check results.

For more information, see View and Save Model Advisor Reports.

Option to run Model Advisor checks in the background

If you have a Parallel Computing Toolbox license, you can run the Model Advisor in the background, allowing you to continue working on your model during Model Advisor analysis. When you start a Model Advisor analysis run in the background, Model Advisor takes a snapshot of your model. The Model Advisor analysis does not reflect changes that you make to your model while Model Advisor is running. For more information, see Run Checks in the Background.

Upgrade Advisor check for get_param calls for block CompiledSampleTime

Upgrade Advisor has a new check to scan MATLAB files in your working environment forget_param function calls that return the block CompiledSampleTime parameter. For multirate blocks, Simulink returns this parameter as a cell array of pairs of doubles. Run this check to identify MATLAB code that accepts the block CompiledSampleTime parameter as a pair of doubles. You can edit these instances of code to accept a cell array of pairs of doubles.

Upgrade Advisor check for signal logging in Rapid Accelerator mode

When simulating your model in Rapid Accelerator mode, you can run a check in Upgrade Advisor to see if signals logged in your model are globally disabled. Using this check, you can enable signal logging globally.

For more information, see Check Rapid Accelerator signal logging.

R2013b

New Features, Bug Fixes, Compatibility Considerations

New Simulink Editor

Ability to add rich controls, links, and images to customized block interfaces using the Mask Editor

The mask editor is enhanced to support designing mask dialogs using controls such as images, links, and buttons. For details, see Masking.

Content preview for subsystems and Stateflow charts

Without opening the blocks, in the Simulink Editor you can preview the content of the following hierarchical items:

  • Subsystems

  • Model blocks

  • Stateflow charts and subcharts

For example, the Throttle & Manifold subsystem uses content preview, and the Compression subsystem does not.

Content preview can help to make a model self-documenting.

Comment-through capability to temporarily delete blocks and connect input signals to output signals

You can comment through blocks such that they appear transparent during simulation. For more information, see Comment Blocks.

New options added to find_system command

You can exclude or include blocks from search using the IncludeCommented option of the find_system command. For more information, see Modeling Basics.

Visual cues for signal lines that cross

Unconnected signal lines that cross have a small break on either side of the intersection, to show that the signals are not connected. For example:

For details, see Signal Line Crossings.

UTF-16 character support for block names, signal labels, and annotations in local languages

You can use international characters when editing text in the Simulink Editor for the following:

  • Block names (the text below the block)

  • Block annotations (text in the Block Properties dialog box Annotations tab, for block property tokens such as %<BlockDescription>)

  • Signal names (in the signal label text box below a signal)

  • Model annotations

You can use international text for block names and signal names when using MATLAB commands such as find_system.

Unified Print Model dialog box for printing

The reorganized Print Model dialog box provides the same printing interface on Microsoft Windows, Macintosh, and Linux platforms.

To consolidate model printing options, the Print Model dialog now includes:

  • Paper type

  • Page orientation

For details, see Printing Options.

Compatibility Considerations

The reorganized Print Model dialog box no longer has these options:

  • Selection for Print Range

    You can use tiled printing and options such as Current system and below to specify the part of a model to print.

  • Properties

    Instead, use the File > Print > Printer Setup > Properties dialog box.

Block Parameters dialog box access from Block Properties dialog box

In the Block Properties dialog box, you can open the Block Parameters dialog box by using the Open Block link. For details, see Block Properties Dialog Box.

Notification bar icon indicator for multiple notifications

After you simulate a model, if there are multiple notifications, the Simulink Editor notification bar icon becomes an arrow. For details, see Record Simulation Data.

Component-Based Modeling

MATLAB System block for including System objects in Simulink models

The MATLAB System block is a new block in the Simulink User-Defined Functions library. Use this block to create a Simulink block that includes a System object in your model. This capability is useful for including algorithms. For more information, see System Object Integration.

Variant Manager that manages all the variants in a model in one place

Variant Manager is a graphical tool that allows you to define and manage multiple variant configurations for Simulink models. For details, see Variant Management.

Improved componentization capabilities for modeling scheduling diagrams with root-level function-call inports

Models can now export functions by using root-level function-call Inport blocks. Such models can simulate in Normal, Accelerator, Rapid Accelerator, SIL, and PIL simulation modes.

Array of buses signal logging in model reference accelerator mode

You can log an array of buses signal in models using model reference accelerator mode or Normal mode. In R2013a, you could only log array of buses signals in Normal mode.

Ability to add, delete, and move input signals within Bus Creator block

The Bus Creator block includes Up, Down, Add, and Remove buttons to simplify organizing the input signals. When you add or remove signals, Simulink automatically updates the Number of inputs parameter of the Bus Creator block and maintains port connectivity in the model.

For details, see Reorder, Add, or Remove Signals in the Bus Creator block reference page.

Streamlined approach to migrating from Classic to Simplified initialization mode

Simplified initialization mode has increased flexibility, such as accepting an empty matrix ([]) for Initial output. These abilities make it easier to migrate custom libraries and models from classic to simplified initialization mode. For more information, see Conditional Subsystem Output Initialization.

Simplified display of sorted execution order

The display of sorted execution order is enhanced for subsystems and blocks such as function-call blocks, making it easier to understand the execution order in a model.

Enhanced model reference rebuild algorithm for MATLAB Function blocks

In conjunction with the Model Configuration > Model Referencing > Rebuild parameter, Simulink examines a set of known target dependencies when determining whether they have changed. R2013b adds another known target dependency: MATLAB files used by MATLAB function blocks.

For details, see Rebuild.

Simulation Analysis and Performance

LCC compiler included on Windows 64-bit platform for running simulations

The Windows 64-bit platform now includes LCC-win64 as the default compiler for running simulations. You no longer have to install a separate compiler for simulation in Stateflow and Simulink. You can run simulations in Accelerator and Rapid Accelerator modes using this compiler. You can also build model reference simulation targets and accelerate MATLAB System block simulations.

    Note:   The LCC-win64 compiler is not available as a general compiler for use with the command-line MEX in MATLAB. It is a C compiler only. You cannot use it for SIL/PIL modes.

LCC-win64 is used only when another compiler is not configured in MATLAB. To build MEX files, you must install a compiler. See Supported Compilers.

Signal logging in Rapid Accelerator mode

You can log signals in Rapid Accelerator mode. Signal logging in Rapid Accelerator mode is similar to signal logging in Normal and Accelerator mode. During model development and testing, using Rapid Accelerator mode usually speeds up simulation with signal logging. For details, see Signal Logging in Rapid Accelerator Mode.

Performance Advisor checks for Rapid Accelerator mode and data store memory diagnostics

Performance Advisor checks have been enhanced to improve simulation and performance optimization.

A single check compares all four simulation modes before recommending the optimal choice:

  • Normal

  • Accelerator

  • Rapid Accelerator

  • Rapid Accelerator with up-to-date check off

There is another check that compares compiler optimizations if the selected simulation mode is Accelerator or Rapid Accelerator.

Also, you can now disable runtime diagnostics for data store memory to reduce runtime overhead and improve simulation speed. For more information, see Diagnostics.

Long long integers in simulation targets for faster simulation on Win64 machines

If your target hardware and your compiler support the C99 long long integer data type, you can select this data type for code generation and simulation. Using long long results in more efficient generated code that contains fewer cumbersome operations and multiword helper functions. This data type also provides more accurate simulation results for fixed-point and integer simulations. If you are using Microsoft Windows (64-bit), using long long improves performance for many workflows including using Accelerator mode and working with Stateflow software.

For more information, see the Enable long long and Number of bits: long long configuration parameters on the Hardware Implementation Pane.

At the command line, you can use the following new model parameters:

  • ProdLongLongMode: Specifies that your C compiler supports the long long data type. Set this parameter to 'on' to enable ProdBitPerLongLong.

  • ProdBitPerLongLong: Describes the length in bits of the C long long data type supported by the production hardware.

  • TargetLongLongMode: Specifies whether your C compiler supports the long long data type. Set this parameter to 'on' to enable TargetBitPerLongLong.

  • TargetBitPerLongLong: Describes the length in bits of the C long long data type supported by the hardware used to test generated code.

For more information, see Model Parameters.

Auto-insertion of rate transition block

Simulink can now automatically handle rate transitions for periodic tasks even if the Greatest Common Divisor (GCD) rate is not in the model. Previously, Simulink required that a block with the GCD sample rate be present in the model to allow automatic insertion of the rate transition block. For more information, see Automatically handle rate transition for data transfer.

Compiled sample time for multi-rate blocks returns cell array of all sample times

For multi-rate blocks (including subsystems), Simulink now returns the compiled sample time for the block as a cell array of all the sample rates present in the block. Therefore, to query the CompiledSampleTime and determine if a subsystem is multi-rate, you no longer need to loop over all the blocks inside a subsystem or build up a list of sample times for the subsystem. The subsystem block CompiledSampleTime parameter now contains that information.

Previously, Simulink returned only the greatest common divisor (GCD) of all sample rates present in the block. This might cause a problem if the GCD rate did not exist in the model, thereby causing Simulink Coder to generate empty functions.

To obtain the complete list of sample times in a block, use the following command:

theBlockSampleTimes = get_param(SubsystemBlock,'CompiledSampleTime');

This is more efficient than querying the sample time for each block and sorting the list.

For more information, see Sample Times in Subsystems.

Compatibility Considerations

Because Simulink now returns the CompiledSampleTime parameter as a cell array of pairs of doubles (instead of a pair of doubles), some compatibility issues can occur.

Consider a variable blkTs, which has been assigned the compiled sample time of a multi-rate block.

blkTs = get_param(block,'CompiledSampleTime');

Here are some examples in which the original code works only if blkTs is a pair of doubles and the block is a single-rate block:

  • Example 1

    if isinf(blkTs(1))
        disp('found constant sample time')
    end
    

    Since blkTs is now a cell array, Simulink gives the following error message:

    Undefined function 'isinf' for input arguments of type 'cell'
    Instead, use this code, for which blkTs can be a cell array or a pair of doubles.

    if isequal(blkTs, [inf,0])
        disp('found constant sample time')
    end
    
  • Example 2

    if all(blkTs == [-1,-1])
        disp('found triggered sample time')
    end
    

    For the above example, since blkTs is now a cell array, Simulink gives the following error:

    Undefined function 'eq' for input arguments of type 'cell'

    Instead, use this code, for which blkTs can be a cell array or a pair of doubles.

    if isequal(blkTs, [-1,-1])
        disp('found triggered sample time')
    end
  • Example 3

    if (blkTs(1) == -1)
        disp('found a triggered context')
    end

    Again, since blkTs is now a cell array, Simulink gives the following error:

    Undefined function 'eq' for input arguments of type 'cell'

    Instead, use this code.

    if ~iscell(blkTs)
        blkTs = {blkTs};
    end
    for idx = 1:length(blkTs)
        thisTs = blkTs{idx};
        if (thisTs(1) == -1)
            disp('found a triggered context')
        end
    end

    The above code checks for a triggered type sample time (triggered or async). In cases in which a block has constant sample time ([inf,0]) in addition to triggered or async or when a block has multiple async rates, this alternative detects sample times in all such cases.

Improvement to model reference parallel build check in Performance Advisor

The model reference parallel build check has been improved to take into account parallel build overhead time when estimating overall overhead time. For more information, see Check model reference parallel build.

Improved readability in Performance Advisor reports

Tables in the HTML report generated by Performance Advisor now appear in a new format for improved clarity and readability.

Simulation Data Inspector launch using simplot command

The simplot command now launches the Simulation Data Inspector. The simplot command is no longer supported and redirects to the Simulation Data Inspector.

Use the Simulation Data Inspector to inspect and compare signal data from simulations. For more information on using the Simulation Data Inspector, see Validate System Behavior.

Compatibility Considerations

In R2013b, the simplot command launches the Simulation Data Inspector, and the return arguments to the function are empty handles. In previous releases, the simplot command returned handles to the handle-graphics figure.

Project and File Management

Impact analysis by exploring modified or selected files to find dependencies

In Simulink Project, use impact analysis to find the impact of changing particular files. You can investigate dependencies visually to explore the structure of your project. You can analyze selected or modified files to find their required and impacted files. Visualize changes and dependencies in the Impact graph.

Impact analysis can show you how a change will impact other files before making the change. For example:

  • Investigate the potential impact of a change in requirements by finding the design files linked to the requirements document.

  • Investigate change set impact by finding upstream and downstream dependencies of modified files before committing the changes. This can help you identify design and test files that might need modifications and find the tests you need to run.

You can label, open, or export the files found by impact analysis. You can use the impact analysis results to create reports or artifacts describing the impact of a change.

For details, see Perform Impact Analysis.

Option to export impact analysis results to the workspace, batch processing, or image files

In Simulink Project, after performing impact analysis, you can export the results to a workspace variable, to batch processing, or to image files. This enables further processing or archiving of impact analysis results.

For details, see Export Impact Results.

Identification of requirements documents during project dependency analysis

In Simulink Project, Dependency Analysis searches for requirements documents linked using the Requirements Management Interface. You can view linked requirements documents in Simulink Project and navigate to and from the linked documents. You can only create or edit Requirements Management links if you have Simulink Verification and Validation.

Previously, you could find requirements documents only for a single model by generating a manifest. Now you can find requirements documents linked anywhere in your project.

Simplified label creation by dragging a label onto files in any view

In Simulink Project, add labels to files by dragging a label onto files. Create labels and categories of labels from any view. These features simplify label creation and application without any need to switch view. You can view project labels at the same time as project files or dependency analysis results.

Previously you could create new labels only at the Labels node, and you could apply a label to a single file only by opening a dialog box.

For details, see Create Labels and Add Labels to Files.

Shortcut renaming, grouping, and execution from any view using the Toolstrip

Simulink Project tools for managing shortcuts enable you to:

  • Create shortcut groups to organize shortcuts by type, for example, to separate shortcuts for loading data, opening models, generating code, and running tests.

  • Annotate shortcuts to make their purpose visible, without changing the file name or location of the script or model the shortcut points to, for example, to change a cryptic file name to a useful string for the shortcut name.

  • Execute project shortcuts from any view in Simulink Project using the toolstrip.

These features simplify shortcut management, allowing you to use shortcuts while viewing your project files or dependency analysis results.

Previously you could view and execute shortcuts only at the Shortcuts node. Now you can find and execute shortcuts whenever they are needed in the projects workflow without switching the view.

Data Management

Streamlined selection of one or more signals for signal logging

In the Simulink Editor, you no longer need to open the Signal Properties dialog box to enable signal logging for a signal. Instead:

  1. Select one or more signals.

  2. Click the Record button arrow and click Log/Unlog Selected Signals.

Simplified modeling of single-precision designs

In R2013b, you can model single-precision designs more easily.

New option to set default for underspecified data types

There is now a model-wide setting to specify the data type to use if Simulink cannot infer the type of a signal during data type propagation. You can now choose to set the default value for underspecified data types to double or single for simulation and code generation. For embedded designs that target single-precision processors, set the Default for underspecified data type configuration parameter to single to avoid introducing double data types. For more information, see Default for underspecified data type.

Operations between singles and integer or fixed-point data types avoid use of doubles

Simulink now supports strict single-precision algorithms for mixed single and integer data types for cast and math operations. Operations, such as cast, multiplication and division, use single-precision math instead of introducing higher precision doubles for intermediate calculations in simulation and code generation. You no longer have to explicitly cast integers or fixed-point inputs of these operations to single precision. To detect the presence of double data types in your model to help you refine your mixed single and integer design, use the Model Advisor Identify questionable operations for strict single-precision design check.

Compatibility Considerations

In R2013b, for both simulation and code generation, Simulink avoids the use of double data types to achieve strict single design for operations between singles and integers. In previous releases, Simulink used double data types in intermediate calculations for higher precision. You might see a difference in the numerical behavior of an operation between earlier releases and R2013b.

For example, when the cast is from a fixed-point or integer data type to single or vice versa, the type for intermediate calculations can have a big impact on the numerical results. Consider:

  • Input type: ufix128_En127

  • Input value: 1.999999999254942 — Stored integer value is (2^128 -2^100)

  • Output type: single

ReleaseCalculation performed by Fixed-Point DesignerOutput ResultDesign Goal
R2013b Y = single(2^-127) * single(2^128-2^100)
= single(2^-127) * Inf
InfStrict singles
Previous releasesY = single( double(2^-127) * double(2^128 - 2^100))
= single(2^-127 * 3.402823656532e+38)
2Higher precision intermediate calculation

There is also a difference in the generated code. Previously, Fixed-Point Designer allowed the use of doubles in the generated code for a mixed multiplication that used single and integer types.

m_Y.Out1 = (real32_T)((real_T)m_U.In1*(real_T)m_U.In2);

In R2013b, it uses strict singles.

m_Y.Out1=(real32_T)m_U.In1*m_U.In2;

To revert to the numerical behavior of previous releases, insert explicit casting from integers to doubles for the inputs of these operations.

Connection status visualization and connection method customization for root inport mapping

The Root Inport Mapping dialog box has the following updates:

  • The Root Inport Mapping dialog box now has connection status visualization. If the Root Inport Mapping status area lists warnings or failures, the software highlights the Inport block associated with the data. Warnings display as yellow Inport blocks outlined in orange, failures display as yellow Inport blocks outlined with bold red, and successes display as normal Inport blocks outlined with blue. Selecting the line item highlights the associated Inport block. For more information, see Understanding Mapping Results.

  • The root inport mapping capability has a new function, getSlRootInportMap. This function provides a new connection method for custom mappings. Use this function when you have a mapping method that is similar to, but not exactly the same as, one of the existing Simulink root inport mapping methods.

Conversion of numeric variables into Simulink.Parameter objects

You can now convert a numeric variable into a Simulink.Parameter object using a single step.

myVar = 5; % Define numerical variable in base workspace
% Create data object and assign variable value to data object value
myObject = Simulink.Parameter(myVar);

Previously, you did this conversion using two steps.

myVar = 5; % Define numerical variable in base workspace
myObject = Simulink.Parameter; % Create data object
myObject.Value = myVar; % Assign variable value to data object value

Model Explorer search options summary hidden by default

To provide more space for displaying search results, the Model Explorer Search Results pane hides the summary of the search options (such as search criteria) that you used.

To view the search options summary, at the top of the Search Results pane, click the Expand Search Results button .

Simulink.DualScaledParameter class

The new Simulink.DualScaledParameter class extends the capabilities of the Simulink.Parameter class. You can define a parameter object that stores two scaled values of the same physical value. Suppose you want to store temperature measurements as Fahrenheit or Celsius values. You can define a parameter that stores the temperature in either measurement scale with a computational method to convert between the dual-scaled values.

You can use Simulink.DualScaledParameter objects in your model for both simulation and code generation. The parameter computes the internal value before simulation or code generation via the computational method, which can be a first-order rational function. This offline computation results in leaner generated code.

For more information, see Simulink.DualScaledParameter.

Legacy data type specification functions return numeric objects

In previous releases, the following functions returned a MATLAB structure describing a fixed-point data type:

Effective R2013b, they return a Simulink.NumericType object. If you have existing models that use these functions as parameters to dialog boxes, the models continue to run as before, and there is no need to change any model settings.

These functions do not offer full Data Type Assistant support. To benefit from this support, use fixdt instead.

FunctionReturn Value in Previous Releases — MATLAB structureReturn Value Effective R2013b — NumericType
float('double')
Class: 'DOUBLE'
DataTypeMode: 'Double'
float('single')
Class: 'SINGLE'
DataTypeMode: 'Single'
sfix(16)
Class: 'FIX'
    IsSigned: 1
    MantBits: 16
DataTypeMode: 'Fixed-point: unspecified scaling'
      Signedness: 'Signed'
      WordLength: 16
ufix(7)
Class: 'FIX'
    IsSigned: 0
    MantBits: 7
DataTypeMode: 'Fixed-point: unspecified scaling'
      Signedness: 'Unsigned'
      WordLength: 7
sfrac(33,5)
Class: 'FRAC'
     IsSigned: 1
     MantBits: 33
    GuardBits: 5
DataTypeMode: 'Fixed-point: binary point scaling'
        Signedness: 'Signed'
        WordLength: 33
    FractionLength: 27
ufrac(44)
Class: 'FRAC'
     IsSigned: 0
     MantBits: 44
    GuardBits: 0
DataTypeMode: 'Fixed-point: binary point scaling'
        Signedness: 'Unsigned'
        WordLength: 44
    FractionLength: 44
sint(55)
Class: 'INT'
    IsSigned: 1
    MantBits: 55
DataTypeMode: 'Fixed-point: binary point scaling'
        Signedness: 'Signed'
        WordLength: 55
    FractionLength: 0
uint(77)
Class: 'INT'
    IsSigned: 0
    MantBits: 77
DataTypeMode: 'Fixed-point: binary point scaling'
        Signedness: 'Unsigned'
        WordLength: 77
    FractionLength: 0

Compatibility Considerations

MATLAB Code

MATLAB code that depends on the return arguments of these functions being a structure with fields named Class, MantBits or GuardBits, no longer works correctly. Change the code to access the appropriate properties of a NumericType object, for example, DataTypeMode, Signedness, WordLength, FractionLength, Slope, and Bias.

C Code

Update C code that expects the data type of parameters to be a legacy structure to handle NumericType objects instead. For example, if you have S-functions that take legacy structures as parameters, update these S-functions to accept NumericType objects.

MAT-files

Effective in R2013b, if you open a Simulink model that uses a MAT-file that contains a data type specification created using the legacy functions, the model uses the same data types and behaves in the same way as in previous releases but Simulink generates a warning. To eliminate the warning, recreate the data type specifications using NumericType objects, and save the MAT-file.

You can use the fixdtupdate function to update a data type specified using the legacy structure to use a NumericType. For example, suppose you saved a data type specification in a MAT-file in a previous release as follows:

oldDataType = sfrac(16);
save myDataTypeSpecification oldDataType
Use fixdtUpdate to recreate the data type specification to use NumericType:
load DataTypeSpecification
fixdtUpdate(oldDataType)
ans = 

  NumericType with properties:

      DataTypeMode: 'Fixed-point: binary point scaling'
        Signedness: 'Signed'
        WordLength: 16
    FractionLength: 15
           IsAlias: 0
         DataScope: 'Auto'
        HeaderFile: ''
       Description: ''
For more information, at the MATLAB command line, enter:
fixdtUpdate

Root Inport Mapping Error Messages

The error message handling has been improved for root import mapping at the consistency check phase. The Simulation Diagnostics Viewer now displays these error messages.

Root inport mapping example

The Using Simulink Mapping Modes in Custom Mapping Functions example shows how to use the getSlRootInportMap function to create a mapping object. This example uses a mapping mode similar to the Simulink block name mapping mode.

Connection to Educational Hardware

Ability to run models on target hardware from the Simulink toolbar

You can use the Deploy to Hardware or Run button on the Simulink toolbar to run models on target hardware.

To enable these buttons, first configure your model to use for Run on Target Hardware.

  1. If you have not done so already, use supportPackageInstaller and install a Simulink support package.

  2. In a model, select Tools > Run on Target Hardware > Prepare to Run.

    The Configuration Parameters dialog box opens and displays the Run on Target Hardware pane.

  3. Set the Target hardware parameter to match your target hardware.

After configuring the model, you can use either button:

  • To deploy the model, click Deploy to Hardware. The model runs as a standalone application on the target hardware.

  • To use External mode, set Simulation mode to External, and then click Run. In External mode, you can tune parameters and monitor a model running on your target hardware.

    Note:   This feature works only with Simulink support packages. The names of these support packages begin with "Simulink Support Package for..."

    For more information, see What is "Run on Target Hardware"?.

    Note:   Some target hardware does not support External mode. For more information, consult the documentation for the specific target hardware.

Support for Arduino hardware available on Mac OS X

You can use Simulink Support Package for Arduino Hardware on Apple Mac OS X platform. This includes support for Arduino Mega 2560, Arduino Uno, Arduino Nano, and Arduino Ethernet Shield hardware.

To use this feature, install the Simulink Support Package for Arduino Hardware, as described in Install Support for Arduino Hardware.

Support for Arduino Ethernet Shield and Arduino Nano 3.0 hardware

You can use Simulink Support Package for Arduino Hardware with the Arduino Ethernet Shield hardware and Arduino Nano 3.0 hardware. The block library for Arduino Ethernet Shield hardware includes TCP/IP and UDP blocks that enable you to design network-enabled embedded systems.

To use this feature, install the Simulink Support Package for Arduino Hardware, as described in Install Support for Arduino Hardware.

The block library for the Arduino Ethernet Shield hardware includes the following blocks:

For more information about this feature, see the Arduino Hardware topic.

Signal Management

Port number display to help resolve error messages

You can display the port numbers in a block that an error message highlights by hovering over the block input or output ports. For details, see Display Port Numbers When Addressing Errors.

Enforced bus diagnostic behavior

For models that use bus primitives, set the Configuration Parameters > Diagnostics > Connectivity > Mux blocks used to create bus signals diagnostic to error. Bus primitives include the Bus Creator, Bus Selector, and Bus Assignment blocks, as well as bus objects.

R2013b enforces setting the diagnostic to error. Benefits of setting this diagnostic to error include:

  • Prevents introducing Mux/bus mixtures into your model. For information about the problems with that mixture, see Prevent Bus and Mux Mixtures.

  • Improves handling of feedback loops.

  • Supports important signal features, including:

    • Nonzero initialization of bus signals

    • Bus support for blocks such as Constant, Data Store Memory, From File, From Workspace, To File, and To Workspace

    • Signal label propagation enhancements

    • Arrays of buses

Compatibility Considerations

When you compile (update or simulate) a model in R2013b, Simulink analyzes the model to determine the extent to which the model uses Mux blocks to create bus signals. The table describes how Simulink handles different kinds of models at compile time, in relationship to the diagnostic.

Model ConfigurationSimulink Actions at Compile TimeYour Required Actions

No bus primitives or muxes that involve different data types

Displays no warning, error, or upgrade message related to this diagnostic

Sets diagnostic to error when you save the model

None

Bus primitives and diagnostic is set to error

None

None

No bus primitives, but one or more mux with different data types

Displays an error message prompting you to launch the Upgrade Advisor

Run the Upgrade Advisor and compile your model.

Bus primitives and diagnostic set to Warning or None

Displays an error message prompting you to launch the Upgrade Advisor

Run the Upgrade Advisor and set the diagnostic to error.

Block Enhancements

Improved performance of LUT block intermediate calculations

Blocks in the Lookup Tables library have a new internal rule for fixed-point data types to enable faster hardware instructions for intermediate calculations (with the exception of the Direct Lookup Table (n-D), Prelookup and Lookup Table Dynamic blocks). To use this new rule, select Speed for the Internal Rule Priority parameter in the dialog box. Select Precision to use the internal rule in R2013a.

Name changes that unify storage class parameters

The following parameters have been renamed to unify the names of storage class parameters.

Old NameNew Name
RTWStateStorageClassStateStorageClass
CodeGenStateStorageClassStateStorageClass

The blocks affected by this name change are Delay, Unit Delay, Memory, Discrete State-Space, Discrete Zero-Pole, Discrete Filter, Discrete Transfer Function, Data Store Memory, and Discrete-Time Integrator.

Compatibility Considerations

Simulink will not support the old parameter names in a future release. If you use the old parameter names in your code to programmatically set parameter values, replace them with the new names.

Warnings when using old parameter names with spaces

Parameter names that include spaces (including block type names) from Simulink Version 1.3 (1994) and earlier now warn. Do not use parameter names with spaces.

Compatibility Considerations

Old parameter names that include spaces (including block type names) from Simulink Version 1.3 (1994) and earlier now cause a warning if you use them with get_param, set_param, find_system, or add_block. Messages direct you to the new parameter name if it exists.

Strictly monotonically increasing time values on Repeating Sequence block

The Time values parameter in the Repeating Sequence block can take only strictly monotonically increasing values. In R2013a, this parameter could take duplicate time values. Run the Upgrade Advisor check "Check model for known block upgrade issues" to identify this issue in your model.

pow function in Math function block that supports Code Replacement Library (CRL)

The Math Function block supports the Code Replacement Library for the pow function, which is useful if you use code generation for models that use this function. For more information, see the Math Function block.

Continuous Linear Block improvements, such as diagnostics, readability, and stricter checks

The Continuous library blocks State-Space, Transfer Fcn, and Zero-Pole have been enhanced as follows:

  • Improved error diagnostics.

  • More readable generated code for large matrices.

  • Stricter checks for changes made to tunable parameters at run time.

  • Unused tunable parameters removed from generated code.

  • Ability for the State-Space block to act as a source block. This change enables the modeling of autonomous linear state-space systems.

  • The following changes in the Transfer Fcn block:

    • Computation of time-domain realization has been enhanced for better performance and error diagnostics

    • Support of sparse Jacobian computation for reduced memory usage, better implicit solver support, and improved structural analysis

MATLAB Function Blocks

Code generation for Statistics Toolbox and Phased Array System Toolbox

Code generation now supports more than 100 Statistics Toolbox™ functions. For implementation details, see Statistics Toolbox Functions.

Code generation now supports most of the Phased Array System Toolbox™ functions and System objects. For implementation details, see Phased Array System Toolbox Functions and Phased Array System Toolbox System Objects.

External C library integration using coder.ExternalDependency

You can define the interface to external code using the new coder.ExternalDependency class. Methods of this class update the compile and build information required to integrate the external code with MATLAB code. In your MATLAB code, you can call the external code without needing to update build information. See coder.ExternalDependency.

Updating build information using coder.updateBuildInfo

You can use the new function coder.updateBuildInfo to update build information. For example:

coder.updateBuildInfo('addLinkFlags','/STACK:1000000');
adds a stack size option to the linker command line. See coder.updateBuildInfo.

Conversion of MATLAB expressions into C constants using coder.const

You can use the new function coder.const to convert expressions and function calls to constants at compile time. See coder.const.

Highlighting of constant function arguments in the compilation report

The compilation report now highlights constant function arguments and displays them in a distinct color. You can display the constant argument data type and value by placing the cursor over the highlighted argument. You can export the constant argument value to the base workspace where you can display detailed information about the argument.

For more information, see Viewing Variables in Your MATLAB Code.

coder.target syntax change

The new syntax for coder.target is:

tf = coder.target('target')
For example, coder.target('MATLAB') returns true when code is running in MATLAB. See coder.target.

You can use the old syntax, but consider changing to the new syntax. The old syntax will be removed in a future release.

LCC compiler included on Windows 64-bit platform for running simulations

The Windows 64-bit platform now includes LCC-win64 as the default compiler for running simulations. You no longer have to install a separate compiler for simulation of MATLAB Function blocks.

LCC-win64 is used only when another compiler is not configured in MATLAB.

Modeling Guidelines

Model Advisor

Collapsible content within Model Advisor reports

The Model Advisor report now collapses the results, making it easier to navigate through the report.

Reorganization of Model Advisor checks

Checks previously provided with Simulink in the Model Advisor Embedded Coder folder are now available with either Simulink Coder or Embedded Coder. For a list of checks available with each product, see:

Check for strict single precision usage

The new Identify questionable operations for strict single-precision design check identifies blocks that introduce double-precision operations. Use this check to help you refine your strict single design.


View release notes for older releases

Compatibility Summary

ReleaseFeatures or Changes with Compatibility Considerations
R2016a
R2015aSP1None
R2015b
R2015a
R2014b
R2014a
R2013b
Was this topic helpful?