๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Simulink. User's Guide R2023b


Publisher
MathWorks
Year
2023
Tongue
English
Leaves
4648
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Table of Contents


Introduction to Simulink
Simulink Basics
Programmatic Modeling Basics
Load a Model
Create a Model and Specify Parameter Settings
Programmatically Load Variables When Opening a Model
Programmatically Add and Connect Blocks
Programmatically Comment Out or Comment Through Blocks
Name a Signal Programmatically
Arrange Model Layouts Automatically
Open the Same Model in Multiple Windows
Use Model Finder to Index and Search Models and Improve their Discoverability
Locate Diagram Elements Using Highlighting
Specify Colors Programmatically
Keyboard Shortcuts and Mouse Actions for Simulink Modeling
View Keyboard Shortcuts in Editor
Perform File and Clipboard Actions
Zoom and Pan
Navigate Model
Select and Move Model Elements
Add and Edit Model Elements
Connect Model Elements
Name Model Elements
Format Block Diagram
Perform Generic Actions
Simulate, Update, and Generate Code for Models
Debug Simulations
Open Models
Open Simulink
Open Blank Models
Open Saved Models
Load Model Variables and Data from MAT-File
Automatically Initialize Variables and Load Data
Set Default Template for New Models
Set Favorite Files
Clear Recent Files
Open Model with Different Character Encoding
Save Models
Determine Whether a Model Has Unsaved Changes
Save Models
Choose Valid Model File Names
Save Model Variables and Data
Specify Code That Runs Before or After Saving Model
Convert Model File Format to SLX
Export Model to Previous Version of Simulink
Add Blocks to Models
Add Blocks to Models Using Quick Insert Menu
Add Blocks to Models Using Library Browser
Explore Available Blocks Using Library Browser
Connect Blocks
Connect Blocks with Signal Lines
Connect Single Output Port to Multiple Input Ports
Connect Output Ports of Multiple Blocks to Single Block
Connect Subsystems
Connect Blocks Without Signal Lines
Comment Out and Comment Through Blocks
Edit Block Parameters
Edit Parameters on Block Icon
Edit Parameters Using the Property Inspector
Edit Parameters Using the Block Parameters Dialog Box
Edit Parameters Programmatically
Specify Block Parameters as Variables
Configure Model Layout
Improve Model Layout with Auto Arrange
Move Multiple Model Elements Simultaneously
Flip or Rotate Blocks
Move Ports
Configure Model Element Names and Labels
Label Signal Lines
Move Signal Line Labels
Change Block Names
Hide or Display Block Names
Move Block Names
Configure Model Style Elements
Customize Model Colors
Customize Model Fonts
Copy Formatting Between Model Elements
Increase Drop Shadow Depth
Customize Block Icons
Visually Organize Models Using Areas
Annotate Models
Create Text Annotations
Add Equations to Text Annotations
Add Symbols to Text Annotations
Create Image Annotations
Associate Annotations with Blocks and Areas
Hide Annotations
Add Hyperlinks to Annotations
Bookmark Your Place in Models
Create a Viewmark
Open and Navigate Viewmarks
Manage Viewmarks
Save a Viewmark to the Model
Refresh a Viewmark
Search Model Contents
Keyword Search for Model Elements and Parameters
Search for Blocks Connected Without Signal Lines
Keyword Search for Simulink Editor Actions
Preview Content of Model Components
Collaborate by Adding Comments to Blocks
Determine Whether Model Has Open Comments
View Comments
Add Comments
Edit, Reply to, and Resolve Comments
Hide and Delete Comments
Print Model Diagrams
Print Models Using Default Settings
Specify Paper Size and Orientation
Specify Background Color
Specify Print Frames
Select the Systems to Print
Print Large Diagrams over Multiple Pages
Add Log of Printed Models
Add Sample Time Legend
Configure Print Job
Print Models to PDFs
Copy Diagrams as Images
Print Model Reports
Programmatically Print Models from MATLAB Command Window
Printing Commands
Print Systems with Multiline Names or Names with Spaces
Set Paper Orientation and Type
Print Diagrams over Multiple Pages
Print Models to Image File Formats
Index and Search Models with Model Finder
Configure and Search Databases
Step Through Simulations
Step Through Simulation
Open and Configure Model
Step Forward One Step at a Time
Step Forward Multiple Time Steps at a Time
Step Back in Simulation
Finish or Stop Simulation
How Stepping Through Simulation Works
Stepping Forward
Capturing Simulation Snapshots
Stepping Back
Pausing on Breakpoints
Additional Considerations for Stepping Through Simulation
Debug Simulation Using Signal Breakpoints
Open and Configure Model
Specify Time to Pause Simulation
View Signal Values in Block Diagram
Step Through Time Steps
Set Breakpoint to Pause Simulation
Step Block by Block
View Execution Order
End Simulation Debugging Session
How Simulink Works
Simulation Phases in Dynamic Systems
Model Compilation
Link Phase
Simulation Loop Phase
Compare Solvers
Fixed-Step Versus Variable-Step Solvers
Continuous Versus Discrete Solvers
Explicit Versus Implicit Continuous Solvers
One-Step Versus Multistep Continuous Solvers
Single-Order Versus Variable-Order Continuous Solvers
Zero-Crossing Detection
Demonstrating Effects of Excessive Zero-Crossing Detection
Preventing Excessive Zero Crossings
How the Simulator Can Miss Zero-Crossing Events
Zero-Crossing Detection in Blocks
Zero-Crossing Detection with Fixed-Step Simulation
Effects of Zero-Crossing Detection in Fixed-Step
Simulate in Fixed-Step Without Zero-Crossing Detection
Enable Fixed-Step Zero-Crossing Detection
Set Parameters for Zero-Crossing Detection
Zero-Crossing Algorithms
Signal Threshold for Adaptive Zero-Crossing Detection
Algebraic Loop Concepts
Mathematical Interpretation
Physical Interpretation
Artificial Algebraic Loops
How the Algebraic Loop Solver Works
Implications of Algebraic Loops in a Model
Identify Algebraic Loops in Your Model
Highlight Algebraic Loops in the Model
Use the Algebraic Loop Diagnostic
Remove Algebraic Loops
Remove Algebraic Loops by Introducing Delay
Solve Algebraic Loops Manually
How the Software Eliminates Artificial Algebraic Loops
Eliminate Artificial Algebraic Loops Caused by Atomic Subsystems
Bundled Signals That Create Artificial Algebraic Loops
Model and Block Parameters to Diagnose and Eliminate Artificial Algebraic Loops
Block Reduction and Artificial Algebraic Loops
Modeling Considerations with Algebraic Loops
Managing Large Models with Artificial Algebraic Loops
Model Blocks and Direct Feedthrough
Changing Block Priorities When Using Algebraic Loop Solver
Use Model Name as Programmatic Interface
Model Requirements
Input Arguments
Execute Size Computation Phase
Execute Compilation Phase
Compute Discrete State Values
Compute Output Values
Compute Continuous State Derivatives
Execute Termination Phase
Modeling Dynamic Systems
Creating a Model
Create Template from Model
Edit a Template
Describe Models Using Notes
Create and Edit Annotations Programmatically
Create Annotation
Find and Modify Annotations
Delete Annotation
Create Annotations That Contain Hyperlinks
Add Image to Model
Create Area
Create and Hide Markup Annotation
Find Annotation Executing Callback Function
Explore Types of Subsystems
Group Blocks into Subsystems
Create Subsystems
Replace Subsystem with Its Contents
Specify Whether Subsystem Is Atomic
Specify Subsystem Read/Write Permissions
Customize Subsystem
Connect Subsystems
Add Ports to Subsystems
Change Port Locations on Subsystem Blocks
Edit Port Labels on Subsystem Blocks
Port Editing Limitations
Expand Subsystem Contents
Why Expand a Subsystem?
What Subsystems Can You Expand?
Expand a Subsystem
Results of Expanding a Subsystem
Navigate Model Hierarchy
Navigate Down in Canvas
Navigate Up Using Explorer Bar
Navigate by Selecting Destination in Model Hierarchy Tree
Navigate to Previously Viewed Level
Navigate Up to Level of Parent Component
Navigate to Library
Open Referenced Model Outside Model Hierarchy
Subsystem Reference
Create a Subsystem Block Diagram
Reference a Subsystem File in a Model
Convert an Existing Subsystem to a Referenced Subsystem
Edit and Save Referenced Subsystem
Attach Data Dictionary to Subsystem Reference
Add a System Mask for Subsystem Reference
Create Self-Modifiable Subsystem Reference Using System Mask
Simulate a Subsystem Block Diagram with a Test Harness
Subsystem Reference Compatibility with Previous Versions
Control Referenced Subsystem Programmatically
Best Practices
Reference a Subsystem File in a Model
Change Subsystem Reference Component Dynamically Using InitFcn
Validate Subsystem Reference Use and Build Model Using Component Codes
Subsystem Reference Demos
Use Control Flow Logic
What is a Control Flow Subsystem
Equivalent C Language Statements
Conditional Control Flow Logic
While and For Loops
Customize Model Behavior with Callbacks
What You Can Do with Callbacks
Types of Callbacks
Callback Limitations
Model Callbacks
Create Model Callbacks
Model Callback Parameters
Referenced Model Callbacks
Block Callbacks
Block Opening Callback Parameters
Block Editing Callback Parameters
Block Compilation and Simulation Callback Parameters
Block Saving and Closing Callback Parameters
Subsystem Block Callback Parameters
Port Callbacks
Initialization Function
Model InitFcn Callback
Block InitFcn Callback
Manage Model Versions and Specify Model Properties
Model File Change Notification
Manage Model Properties
Access Model Information Programmatically
Model Discretizer
What Is the Model Discretizer?
Requirements
Discretize a Model with the Model Discretizer
Model Discretizer Workflow
View the Discretized Model
Discretize Blocks from the Simulink Model
Discretize a Model with the sldiscmdl Function
Create Model That Performs Neighborhood Processing
Import Image and Output Results
Configure Neighborhood Processing Subsystem
Simulate and View Results
Specify Region of Interest for Neighborhood Processing
Import Image and Output Results
Configure Neighborhood Processing Subsystem
Simulate and View Results
Use Neighborhood Processing Subsystem Block Padding Options with Region of Interest
Overview of Parameters
Example
Model Advisor
Check Your Model Using the Model Advisor
Model Advisor Overview
Run Model Advisor Checks and Review Results
Run Model Checks Programmatically
Find Model Advisor Check IDs
Address Model Check Results
Fix a Model Advisor Check Warning or Failure
Save and View Model Advisor Check Reports
Save Model Advisor Check Reports
View Model Advisor Check Reports
Upgrade Advisor
Consult the Upgrade Advisor
Upgrade Programmatically
Upgrade Advisor Checks
Working with Sample Times
What Is Sample Time?
What Is Union Sample Time?
Specify Sample Time
Designate Sample Times
Specify Block-Based Sample Times Interactively
Specify Port-Based Sample Times Interactively
Specify Block-Based Sample Times Programmatically
Specify Port-Based Sample Times Programmatically
Access Sample Time Information Programmatically
Specify Sample Times for a Custom Block
Determining Sample Time Units
Change the Sample Time After Simulation Start Time
View Sample Time Information
Inspect Sample Time Using Timing Legend
Inspect Sample Times Throughout a Model
Types of Sample Time
Discrete Sample Times
Continuous Sample Times
Events and Asynchronous Sample Times
Other Sample Times
Multirate Sample Times
Dataflow Sample Time
Initialize, Reinitialize, Terminate Sample Times
Blocks for Which Sample Time Is Not Recommended
Best Practice to Model Sample Times
Appropriate Blocks for the Sample Time Parameter
Specify Sample Time in Blocks Where Hidden
Block Compiled Sample Time
Sample Times in Subsystems
Sample Times in Systems
Purely Discrete Systems
Hybrid Systems
Resolve Rate Transitions
Automatic Rate Transition
Visualize Inserted Rate Transition Blocks
How Propagation Affects Inherited Sample Times
Process for Sample Time Propagation
Simulink Rules for Assigning Sample Times
Backpropagation in Sample Times
Specify Execution Domain
Domain Specification Badge
Types of Execution Domains
Set Execution Domain
Enforce Discrete Execution Domain for a Subsystem
Referencing a Model
Model Reference Basics
Model Reference Advantages
Model Reference Hierarchy
Model Reference Interface
Model Workspaces and Data Dictionaries
Model Reference Behavior and Execution
Model Reference Simulation and Code Generation
Model Reference Requirements and Limitations
Model Reuse
Model Masks
S-Functions in Referenced Models
Model Architecture Requirements and Limitations
Signal Requirements and Limitations
Simulation Requirements and Limitations
Code Generation Requirements and Limitations
Reference Existing Models
Reference Protected Models from Third Parties
Load Supporting Files for Protected Model
Verify Digital Signature of Protected Model
View Protected Model Contents
Test Protected Model in Isolated Environment
Reference Protected Model
Use Models Protected in Previous Releases
Convert Subsystems to Referenced Models
Prepare Subsystem for Conversion
Convert Subsystems to Referenced Models
Conversion Results
Compare Simulation Results Before and After Conversion
Revert Conversion
Integrate Referenced Model into Parent Model
Conditionally Execute Referenced Models
Conditional Models
Requirements for Conditional Models
Modify a Referenced Model for Conditional Execution
Inspect Model Hierarchies
Content Preview
Model Dependency Graph
List of Model References
Model Version Numbers
Define Model Reference Interfaces
Add Ports to Model Reference Interface
Refresh Model Blocks
Define Signal Attributes
Use Buses at Model Interfaces
Log Signals in Referenced Models
Configure Sample Times
Share Data Among Referenced Model Instances
Referenced Model Sample Times
How Sample-Time Inheritance Works for Model Blocks
Conditions for Inheriting Sample Times
Determining Sample Time of a Referenced Model
Blocks That Depend on Absolute Time
Blocks Whose Outputs Depend on Inherited Sample Time
Sample Time Consistency
Sample Rates and Solvers
Choose Simulation Modes for Model Hierarchies
Model Reference Simulation Modes
Overridden Simulation Modes
Override Model Reference Simulation Modes
Simulate Conditionally Executed Referenced Models
Triggered, Enabled, and Triggered and Enabled Models
Function-Call Models
Simulate Multiple Referenced Model Instances in Normal Mode
Normal Mode Visibility
Examine Multiple Referenced Model Instances
Determine Which Instance Has Normal Mode Visibility Enabled
Specify Which Instance Has Normal Mode Visibility Enabled
Manage Simulation Targets for Referenced Models
Reduce Time Spent Checking For Changes
Specify Programming Language of Simulation Targets
Use Custom Code for Simulation Targets
Control Location of Simulation Targets
Reduce Update Time for Referenced Models by Using Parallel Builds
Share Simulink Cache Files for Faster Simulation
Inspect Simulink Cache File Contents
Use Simulink Cache Files
Check for Simulink Cache Files in Projects
Set Configuration Parameters for Model Hierarchies
Manage Configuration Parameters by Using Configuration References
Review Configuration Requirements for Simulation of Model Reference Hierarchies
Specify Compatible Solver Settings
Configure Local Solver Settings
Diagnostics That Are Ignored in Accelerator Mode
Parameterize Instances of a Reusable Referenced Model
Specify a Different Value for Each Instance of a Reusable Model
Define Model Arguments Without Specifying a Default Value
Combine Multiple Arguments into a Structure
Parameterize a Referenced Model
Change Model Argument Name or Value
Customize User Interface for Reusable Components
Configure Instance-Specific Data for Simulink.LookupTable and Simulink.Breakpoint Objects
Parameterize a Referenced Model Programmatically
Group Multiple Model Arguments into a Single Structure
Configure Instance-Specific Data for Lookup Tables Programmatically
Simulink Units
Unit Specification in Simulink Models
Guidelines for Unitless, Dimensionless, and No Unit Quantities
Specify Physical Quantities
Specify Units in Objects
Specify Units for Temperature Signals
Specify Units in MATLAB Function Blocks
Specify Units in Constant Blocks
Specify Units for Logging and Loading Signal Data
Restricting Unit Systems
Displaying Units
Unit Consistency Checking and Propagation
Unit Consistency Checking and Model Arguments
Unit Propagation Between Simulink and Simscape
Converting Units
Automatic Unit Conversion Limitations
Update an Existing Model to Use Units
Model for Updating Units
Incrementally Work Through the Model to Set Units
Working with Custom Unit Databases
Custom Units Spreadsheet Format
Define Custom Units in Excel Spreadsheet
Create and Load Custom Unit Database
Troubleshooting Units
Undefined Units
Overflow and Underflow Errors or Warning
Mismatched Units Detected
Mismatched Units Detected Between Model Argument Definition and Value
Mismatched Units Detected While Loading
Disallowed Unit Systems
Automatic Unit Conversions
Unsuccessful Automatic Unit Conversions
Simscape Unit Specification Incompatible with Simulink
Conditional Subsystems
Conditionally Executed Subsystems Overview
Ensure Output Port Is Virtual
Merged Conditional Output Signals
Merged Partial-Write Signals
Using Enabled Subsystems
Create an Enabled Subsystem
Blocks in Enabled Subsystems
Alternately Executing Enabled Subsystem Blocks
Model Examples
Using Triggered Subsystems
Create a Triggered Subsystem
Triggering with Discrete Time Systems
Triggered Model Versus a Triggered Subsystem
Blocks in a Triggered Subsystem
Model Examples
Using Enabled and Triggered Subsystems
Creating an Enabled and Triggered Subsystem
Blocks in an Enabled and Triggered Subsystem
Model Examples
Select Subsystem Execution
Models with If-Else Structures
Models with Switch Case Structure
Iterate Subsystem Execution with While Iterator and For Iterator Subsystems
Models with While Structures
Model with For Structures
Repeat an Algorithm Using a For-Each Subsystem
Explore Example Model
Identify Opportunities to Simplify Model
Remove Redundant Blocks
Simplify Interfaces with Buses
Repeat an Algorithm
Organize Parameters into Arrays of Structures
Inspect Converted Model
Additional Examples of Working with For-Each Subsystems
Limitations of For-Each Subsystems
Using Function-Call Subsystems
Creating a Function-Call Subsystem
Sample Time Propagation in a Function-Call Subsystem
Latched Input Data for Function-Call Subsystems
Conditional Subsystem Initial Output Values
Inherit Initial Output Values from Input Signals
Specify Initial Output Values Using Dialog Parameters
Schedule Components to Avoid Data Dependency Issues
Create Rate-Based Model
Rate-Based Model with Scheduled Subsystem Blocks
Test Rate-Based Model Simulation Using Function-Call Generators
Create Test Model That References Rate-Based Model
Simulate Test Harness for Rate-Based Model
Avoid Common Compile and Run-Time Errors
Generate Code from Rate-Based Model
Code Generation Report for Rate-Based Models
Generated Code Entry Points for Rate-Based Models
Sorting Rules for Explicitly Scheduled Model Components
Export-Function Models
Test Harness for Export Function Models with Strict Scheduling
Test Harness for Export-Function Models Without Strict Scheduling
Data Dependency Error Caused by Data Sorting Rules
Test Harness for Models with Initialize, Reset, and Terminate Function Blocks
Initiators for Model Block in Test Harness
Conditional Subsystem Output Values When Disabled
Simplified Initialization Mode
When to Use Simplified Initialization
Set Initialization Mode to Simplified
Classic Initialization Mode
Set Initialization Mode to Classic
Classic Initialization Issues and Limitations
Identity Transformation Can Change Model Behavior
Inconsistent Output with Discrete-Time Integrator or S-Function Block
Execution Order Affecting Merge Block Output
Tunable Parameters
State
Simulink does not provide correct consistency check
Convert from Classic to Simplified Initialization Mode
Blocks to Consider
Create Export-Function Model
Designate Model as Export-Function Model and Satisfy Export-Function Model Requirements
Create Model Algorithms
Add Function-Call Inputs
Export-Function Model with Unit Delay and Square Functions
Test Model
Test Export-Function Model Simulation Using Input Matrix
Create Function-Call Inputs and Data Inputs
Simulate Export-Function Model
Test Export-Function Model Simulation Using Function-Call Generators
Reference an Export-Function Model
Create Test Model (Harness) for Simulation
Prepare Export-Function Model for Simulation
Test Export-Function Model with Function-Call Generator Blocks
Test Export-Function Model Simulation Using Stateflow Chart
Reference an Export-Function Model
Create Periodic Scheduler Using Stateflow Chart
Create Test Model (Harness) for Simulation
Prepare Export-Function Model for Simulation
Test Export-Function Model Using Stateflow Chart
Test Export-Function Model Simulation Using Schedule Editor
Create Test Model (Harness) for Simulation
Create Function-Call Events Using the Schedule Editor
Prepare Export-Function Model for Simulation
Test Export-Function Model Using Schedule Editor
Generate Code for Export-Function Model
Generate Code for Exported Functions
Generate Code for Export-Function Model with Rate-Based Model
Create Export-Function Model with Scheduled Subsystems and Rate-Based Model
Generate Code for Export-Function Model with Rate-Based Model
Export-Function Models Overview
Workflows for Export-Function Models
Blocks Allowed at Top Level of Export-Function Models
Requirements for Export-Function Models
Designating an Export-Function Model
Sample Time for Function-Call Subsystems
Execution Order for Root-Level Function-Call Inport Blocks
Nested Export-Function Models
Export-Function Model with a Multi-Instanced Function-Call Model
Export-Function Models and Models with Asynchronous Function-Call Inputs
Using Resettable Subsystems
Behavior of Resettable Subsystems
Comparison of Resettable Subsystems and Enabled Subsystems
Model Examples
Simulink Functions Overview
What Are Simulink Functions?
What Are Simulink Function Callers?
Connect to Local Signals
Reusable Logic with Functions
Input/Output Argument Behavior
Shared Resources with Functions
How a Function Caller Identifies a Function
Reasons to Use a Simulink Function Block
Choose a Simulink Function or Reusable Subsystem
When Not to Use a Simulink Function Block
Tracing Simulink Functions
Highlight and Animate Function Calls
Add a Simulink Function to a Model
Simulink Functions and Function Callers
Create Simulink Function Using Simulink Function Block
Create Simulink Function Using Exported Graphical Function from Stateflow Chart
Create Simulink Function Using Exported MATLAB Function from Stateflow Chart
Call a Simulink Function from a Model
Simulink Functions and Function Callers
Use a Function Caller Block to Call a Simulink Function Block
Use a MATLAB Function Block to Call a Simulink Function Block
Use a Stateflow Chart to Call a Simulink Function Block
Call a Simulink Function Block from Multiple Sites
Argument Specification for Simulink Function Blocks
Example Argument Specifications for Data Types
Input Argument Specification for Bus Data Type
Input Argument Specification for Enumerated Data Type
Input Argument Specification for an Alias Data Type
Simulink Function Blocks in Referenced Models
Simulink Function Block in Referenced Model
Function Caller Block in Referenced Model
Function and Function Caller Blocks in Separate Referenced Models
Function and Function Caller in Same Model
Scoped, Global, and Port-Scoped Simulink Function Blocks Overview
Scoped Simulink Function Blocks in Subsystems
Resolve to a Function Hierarchically
Resolve to a Function by Qualification
Scoped Simulink Function Blocks in Models
Resolve to a Function Hierarchically
Resolve to a Function by Qualification
Multi-Instance Modeling with Simulink Functions
Model Client-Server Communication Using Function Ports
Connect Client and Server Models with Function Ports
Configure Asynchronous Execution with Function Ports
Define Diagnostic Services Using Simulink Functions
Diagnostic Messaging with Simulink Functions
Client-Server Architecture
Modifier Pattern
Observer Pattern
Resolve Error: Block Is Unable to Call The Scoped Simulink Function
Issue
Possible Solutions
Using Initialize, Reinitialize, Reset, and Terminate Functions
Create Model Component with State
Initialize Block State
Reset Block State
Read and Save Block State
Prepare Model Component for Testing
Create an Export-Function Model
Create Test Harness to Generate Function Calls
Reference the Export-Function Model
Model an Event Scheduler
Connect Chart to Test Model
Initialize and Reset Parameter Values
Adding a Parameter Writer Block
Writing to Tunable Block Parameters
Writing to Model Instance Parameters
Writing to Masked Subsystem Parameters
Writing to Model Workspace Variables
Initialize, Reinitialize, Reset, and Terminate Function Limitations
Unsupported Blocks and Signals
Unsupported Modeling Patterns
Reinitialize States of Blocks in Subsystem
Model House Heating System
Open Completed House System Model
Define a House Heating System
Model House Heating System
Integrate a House Heating Model
Prepare for Simulation
Run and Evaluate Simulation
Wireless Tire Pressure Monitoring System with Fault Logging
Prepare Sensor and Controller Models in a Distributed Monitoring System for Code Generation
Fixed-Point Data Type Support for If Block
Floating-Point Model without Fixed-Point Data
Block and Model Configurations
Model with If Action Subsystems and Fixed-Point Data Types
Model Analysis
Messages in Simulink
Simulink Messages Overview
Model Message Send and Receive Interfaces and Generate Code
Model Event-Driven Receive Interfaces
Simulate Middleware Effects on a Distributed Architecture
Animate and Understand Sending and Receiving Messages
Use a Queue Block to Manage Messages
Establish Message Send and Receive Interfaces Between Software Components
Connect Message Receive Interface with Simulink Functions
Modeling Message Communication Patterns with SimEvents
Build a Shared Communication Channel with Multiple Senders and Receivers
Model Wireless Message Communication with Packet Loss and Channel Failure
Model an Ethernet Communication Network with CSMA/CD Protocol
Send and Receive Messages Carrying Bus Data
Use Virtual Buses with Message Elements for Component Communication
Merge Message Lines Using a Message Merge Block
Specify Queue Properties for Message Interface
Specify Queue Properties
Queue Expansion
Virtual Buses with Message Elements in Architecture Models
Use the Sequence Viewer to Visualize Messages, Events, and Entities
Components of the Sequence Viewer Window
Navigate the Lifeline Hierarchy
View State Activity and Transitions
View Function Calls
Simulation Time in the Sequence Viewer Window
Redisplay of Information in the Sequence Viewer Window
Using Message Polling and Message Triggered Subsystems
Asynchronous Message Handling in Adaptive Cruise Control
Temperature Control System Communicating with Messages
Modeling Variant Systems
What Are Variants and When to Use Them
What Are Variants?
Advantages of Using Variants
When to Use Variants
Types of Variants in Simulink
Variant Blocks in Simulink
Use Variants to Create One Model for Many Systems
Working with Variants
Variant Terminology
Command Line Parameters
Define and Configure Variant Sources and Sinks
Represent Variant Choices in Variant Source and Variant Sink Blocks
Visualize Variant Implementations in a Single Layer
How Variant Sources and Sinks Work
Advantages of Using Variant Sources and Sinks
Limitations of Using Variant Sources and Sinks
Provide Variation in Signal Source and Destination Using Manual Variant Source and Manual Variant Sink Blocks
Create a Simple Variant Model
Implement Variations in Separate Hierarchy Using Variant Subsystems
Working with Variant Choices
Default Variant Choice
Active Variant Choice
Inactive Variant Choice
Empty Variant Choice
List of Variant Choices
Open Active Variant
Introduction to Variant Controls
Variant Control Modes in Variant Blocks
Types of Variant Control Modes in Variant Blocks
Switch Between Choices Using Condition Expressions in Variant Blocks
Switch Between Choices Using Labels in Variant Blocks
Switch Between Choices for Simulation and Code Generation Workflows Without Using Control Variables in Variant Blocks
Compare Different Types of Variant Control Modes in Variant Blocks
Variant Activation Times for Different Variant Control Modes in Variant Blocks
Use Variant Control Variables in Variant Blocks
Simulink.VariantControl Variables for Coherent Switching of Choices in Variant Blocks
Scalar Variant Control Variables for Rapid Prototyping in Variant Blocks
Simulink.Parameter Type of Variant Control Variables for Code Generation in Variant Blocks
Enumerated Types To Improve Code Readability of Variant Control Variables of Variant Blocks
Simulink.Variant Objects for Variant Condition Reuse of Variant Blocks
Structures to Group Related Variant Control Variables of Variant Blocks
Create Variant Controls Programmatically
Create and Export Variant Controls
Reuse Variant Conditions
Enumerated Types as Variant Controls
Activate Variant During Different Stages of Simulation and Code Generation Workflow
Stages to Set Active Choices in Variant Blocks and Variant Parameters
Types of Variant Activation Time in Variant Blocks and Variant Parameters
Variant Activation Time for Variant Blocks
Variant Activation Time in Variant Parameters
Storage Classes for Different Variant Activation Times
Verify and Validate Variant Models with Code Compile Activation Time
Simulate Variant Subsystem with Startup Activation Using parsim
Simulate a Protected Model with Code Compile or Startup Activation Time
Simulate Variant Blocks in Accelerator and Rapid Accelerator Modes with Startup Activation Time
Run Iterative Simulations Without Recompiling Model for Variant Systems Using Fast Restart
Verify and Validate Variant Models with Startup Activation Time
Known Limitations of startup variant activation time
Considerations and Limitations for startup Variant Activation Time
Combining startup and code compile Variant Activation Times in Variant Conditions
Use of Variant Control Variables with startup Variant Activation Time in Another Variant Block
Propagate Variant Conditions to Define Variant Regions with Variant Blocks
Visualize Propagated Variant Conditions in Variant Conditions Legend
Propagate Variant Conditions from Variant Blocks Upstream and Downstream
Limitations
Assemble Variant Conditions Propagated from Variant Blocks
Cross-Coupling of Inputs and Outputs
Cascading Blocks and Compounding Conditions
Hierarchical Nesting of Blocks
Propagate Variant Conditions to Define Variant Regions Outside Variant Subsystems
Factors That Affect Propagation of Variant Conditions Outside of Variant Subsystem Blocks
Adaptive Interface for Variant Subsystems
Propagation with Different Activation Times
Propagation Without Inport and Outport Blocks
Limitations
Propagate Variant Conditions to Define Variant Regions Using Variant Source and Variant Sink Blocks
Variant Source and Variant Sink Blocks
Variant Elements Within Buses
Propagate Variant Conditions to Define Variant Regions in Virtual and Nonvirtual Subsystems
Propagate Variant Conditions to Control Execution of Conditional Subsystems
Variant Signals from Variant Source Outport to Function-Call Subsystem
Variant Signals from Variant Subsystem Inport to Function-Call Subsystems
Variant Signals from Variant Subsystem Outport to Function-Call Subsystems
Propagate Variant Conditions to Enable or Disable Model or Subsystem References in Hierarchy
Conditionally Execute Custom Initialize, Reinitialize, Reset, and Terminate Routines
Conditionally Execute Simulink Functions
Control Variant Condition Propagation
Approaches to Control Active Variant Choice of a Variant Block Using Mask or Model Workspace
Control Structural Variations Using Mask Parameters and Model Arguments
Control Active Choice of Locked Custom Library Variant Subsystem Using Mask Parameter
Model
Switch Between Active Choices
Add or Remove Variant Choices of Variant Assembly Subsystem Blocks Using External Files
Manipulate Variant Choices of Variant Assembly Subsystem Block in Label Mode
Manipulate Variant Choices of Variant Assembly Subsystem Block in Expression Mode
Control Variant Choices in Masked Variant Assembly Subsystem Block Using Mask Parameter Object
Switch Between Variant Choices of Masked Variant Assembly Subsystem Block in Label Mode
Switch Between Variant Choices of Masked Variant Assembly Subsystem Block in Expression Mode
Automatic Mask Icon Promotion in Variant Subsystems
Prepare Variant-Containing Model for Code Generation
Convert Variant Control Variables into Simulink.Parameter Objects
Configure Model for Generating Preprocessor Conditionals
Create Variant Controls Using an In-Memory Enumeration Class
Represent Variant Condition Values of Enumerated Type in Generated Code
Create Variant Controls Using MATLAB Enumeration Class
Generate Code from Variant Blocks with Startup Activation Time
Generate Code from Nested Variant Subsystem with Code Compile and Startup Activation
Create Real-Time Applications Using Variants and Simulink Real-Time
Create Standalone Executables with Variants Using Simulink Compiler
Export and Import Function Mockup Unit (FMU) from Model with Variant Subsystem Blocks
Simulink Variant Examples
V-Model for System Development with Simulink Variants
System-Level Model
Components โ€” Create Models with Structural Variations
Components โ€” Create Models with Parameter Value Variations
Components โ€” Create Models with Variations in Transition Paths
Components โ€” Create Models with Variations in Dimensions
Components โ€” Create Models with Variations in AUTOSAR Interfaces
Components โ€” Manage Structural Variations in a Model
Generated Code
Component Tests and System-Level Tests
Identify Variant Activeness of a Block After Model Compilation
Use find_system with Built-In MatchFilter Options for Variant Blocks
Convert Variant Subsystem to Variant Assembly Subsystem
Convert Variant Subsystem Block with Expressions to Variant Assembly Subsystem Block Interactively
Convert Variant Subsystem Block with Expressions to Variant Assembly Subsystem Block Programmatically
Convert Variant Subsystem Block with Labels to Variant Assembly Subsystem Block Interactively
Convert Variant Subsystem Block with Labels to Variant Assembly Subsystem Block Programmatically
Convert Configurable Subsystem to Variant Subsystem
Using Upgrade Advisor interactively
Using Upgrade Advisor Programmatically
Using convertToVariantSubsystem Method
Using Context Menu of Configurable Subsystem Block
Changing Active Variant
Managing Model Configurations
Set Model Configuration Parameters for a Model
Set Configuration Parameters Programmatically
Set Configuration Parameters by Using the Dialog Box
Manage Configuration Sets for a Model
Create a Configuration Set in a Model
Change Configuration Parameter Values in a Configuration Set
Activate a Configuration Set
Copy, Delete, and Move a Configuration Set
Save a Configuration Set
Load a Saved Configuration Set
Compare Configuration Sets
Share a Configuration with Multiple Models
Create a Configuration Set in the Data Dictionary
Create and Attach a Configuration Reference
Resolve a Configuration Reference
Activate a Configuration Reference
Create a Configuration Reference in Another Model
Change Parameter Values in a Referenced Configuration Set
Change Parameter Value in a Configuration Reference
Save a Referenced Configuration Set
Load a Saved Referenced Configuration Set
Configuration Reference Limitations
Share a Configuration Across Referenced Models
Automate Model Configuration by Using a Script
Configuration Object Functions
Configuring Models for Targets with Multicore Processors
Concepts in Multicore Programming
Basics of Multicore Programming
Types of Parallelism
System Partitioning for Parallelism
Challenges in Multicore Programming
Multicore Programming with Simulink
Basic Workflow
How Simulink Helps You to Overcome Challenges in Multicore Programming
Implement Data Parallelism in Simulink
Implement Task Parallelism in Simulink
Implement Pipelining in Simulink
Configure Your Model for Concurrent Execution
Specify a Target Architecture
Choose from Predefined Architectures
Define a Custom Architecture File
Partition Your Model Using Explicit Partitioning
Prerequisites for Explicit Partitioning
Add Periodic Triggers and Tasks
Add Aperiodic Triggers and Tasks
Map Blocks to Tasks, Triggers, and Nodes
Implicit and Explicit Partitioning of Models
Partitioning Guidelines
Configure Data Transfer Settings Between Concurrent Tasks
Optimize and Deploy on a Multicore Target
Generate Code
Build on Desktop
Profile and Evaluate Explicitly Partitioned Models on a Desktop
Customize the Generated C Code
Programmatic Interface for Concurrent Execution
Map Blocks to Tasks
Supported Targets For Multicore Programming
Supported Multicore Targets
Supported Heterogeneous Targets
Limitations with Multicore Programming in Simulink
Multithreaded Simulation Using For Each Subsystem
Modeling Best Practices
General Considerations when Building Simulink Models
Avoiding Invalid Loops
Shadowed Files
Model Building Tips
Model a Continuous System
Best-Form Mathematical Models
Series RLC Example
Solving Series RLC Using Resistor Voltage
Solving Series RLC Using Inductor Voltage
Model a Simple Equation
Model Differential Algebraic Equations
Overview of Robertson Reaction Example
Simulink Models from ODE and DAE Equations
Simulink Model from ODE Equations
Simulink Model from DAE Equations
Simulink Model from DAE Equations Using Algebraic Constraint Block
Basic Modeling Workflow
Model a System Algorithm
Create Model Components
Manage Signal Lines
Manage Model Data
Reuse Model Components from Files
Create Interchangeable Variations of Model Components
Set Up a File Management System
Project Setup
Organize Large Modeling Projects
What Are Projects?
Explore Project Tools with the Airframe Project
Explore the Airframe Project
Set Up Project Files and Open the Project
View, Search, and Sort Project Files
Open and Run Frequently Used Files
Review Changes in Modified Files
Run Dependency Analysis
Run Project Integrity Checks
Commit Modified Files
View Project and Source Control Information
Create a Project from a Model
Set MATLAB Projects Preferences
Create a New Project from a Folder
Add Files to the Project
Create a New Project from an Archived Project
Create a New Project Using Templates
Use Project Templates from R2014a or Before
Open Recent Projects
Specify Project Details, Startup Folder, and Derived Files Folders
Specify Project Path
What Can You Do with Project Shortcuts?
Automate Startup Tasks
Automate Shutdown Tasks
Create Shortcuts to Frequent Tasks
Create Shortcuts
Group Shortcuts
Annotate Shortcuts to Use Meaningful Names
Customize Shortcut Icons
Use Shortcuts to Find and Run Frequent Tasks
Create Templates for Standard Project Settings
Using Templates to Create Standard Project Settings
Create a Template from the Current Project
Create a Template from a Project Under Version Control
Edit a Template
Remove a Template
Explore the Example Templates
Project File Management
Group and Sort File Views
Search Inside Project Files and Filter File Views
Project-Wide Search
Filter Project File Views
More Ways to Search
Work with Project Files
Manage Shadowed and Dirty Models and Other Project Files
Identify Shadowed Project Files When Opening a Project
Find Models and Other Project Files With Unsaved Changes
Manage Open Models and Data Dictionaries When Closing a Project
Move, Rename, Copy, or Delete Project Files
Move or Add Files
Automatic Updates When Renaming, Deleting, or Removing Files
Back Out Changes
Create Labels
Add Labels to Files
View and Edit Label Data
Automate Project Tasks Using Scripts
Create a Custom Task Function
Run a Project Custom Task and Publish Report
Sharing Projects
Share Project by Email
Share Project as a MATLAB Toolbox
Share Project on GitHub
Archive Projects
Upgrade All Project Models, Libraries, and MATLAB Code Files
Upgrade Libraries
Analyze Model Dependencies
Open and Explore Dependency Graph
Model Dependency Views
Find Required Products
Export Dependency Analysis Results
Create Project from the Dependency Graph
View Requirements Toolbox Links Associated with Model Elements
Highlight, Filter, and View Information for Links in a Model
Navigate to Externally Stored Requirements from a Model
Identify and Run Tests in MATLAB Projects
Label Test Files
Identify and Run All Tests in Project
Create Test Suite from Project Test Files
Project Dependency Analysis
Dependency Analyzer Scope and Limitations
Analysis Scope
Analysis Limitations
Run a Dependency Analysis
Explore the Dependency Graph, Views, and Filters
Select, Pan, and Zoom
Investigate Dependency Between Two Files
Color Files by Type, Status, or Label
Apply and Clear Filters
Perform an Impact Analysis
About Impact Analysis
Run a Dependency Analysis
Find Required Products and Add-Ons
Find Dependencies of Selected Files
Check Dependency Results and Resolve Problems
Investigate Problem Files in Dependency Graph
Investigate Problem Files in File List
Find Requirements Documents in a Project
Export Dependency Analysis Results
Send Files to Project Tools
Project Source Control
About Source Control with Projects
Classic and Distributed Source Control
Add a Project to Source Control
Add a Project to Git Source Control
Add a Project to SVN Source Control
Set Source Control Preferences
Source Control Preferences in MATLAB Online
Register Model Files with Source Control Tools
Set Up SVN Source Control
Set Up SVN Provided with Projects
Set Up Project SVN for SVN Version Already Installed
Set Up Project SVN for SVN Version Not Yet Provided with Projects
Register Model Files with Subversion
Enforce SVN Locking Model Files Before Editing
Share a Subversion Repository
Manage SVN Externals
Set Up Git Source Control
Register Binary Files with Git
Configure MATLAB for Git on Windows
Configure MATLAB to Use Git SSH Authentication
Install Git Credential Helper
Disable Compression for Simulink Models
Configure Git to Use Git LFS
Configure Git to use MATLAB for Diff and Merge
Install Command-Line Git Client
Add Git Submodules
Update Submodules
Use Fetch and Merge with Submodules
Use Push to Send Changes to the Submodule Repository
Automatically Merge Models
Create New GitHub Repository
Disable Source Control
Change Source Control
Write a Source Control Integration with the SDK
Clone Git Repository
Check Out SVN Repository
Tag and Retrieve Versions of Project Files
Refresh Status of Project Files
Check for Modifications
Update Revisions of Project Files
Update Revisions with SVN
Update Revisions with Git
Update Selected Files
Get SVN File Locks
Manage SVN Repository Locks
View Modified Files
Project Definition Files
Compare Revisions
Run Project Checks
Commit Modified Files to Source Control
Revert Changes
Discard Local Changes
Revert a File to a Specified Revision
Revert the Project to a Specified Revision
Pull, Push, and Fetch Files with Git
Pull and Push
Pull, Fetch, and Merge
Push Empty Folders
Use Git Stashes
Branch and Merge Files with Git
Create a Branch
Switch Branch
Compare Branches and Save Copies
Merge Branches
Revert to Head
Delete Branches
Resolve Conflicts
Resolve Conflicts
Merge Text Files
Merge Models
Extract Conflict Markers
Work with Derived Files in Projects
Customize External Source Control to Use MATLAB for Diff and Merge
Finding the Full Paths for MATLAB Diff, Merge, and AutoMerge
Integration with Git
Integration with SVN
Integration with Other Source Control Tools
Continuous Integration Using MATLAB Projects and Jenkins
Prerequisites
Set Up MATLAB Project for Continuous Integration in Jenkins
Reduce Test Runtime Using Dependency Cache and Impact Analysis
Enhance Workflow
Determine Order for Resolving Conflicts Using Dependency Analyzer
Project Reference
Componentization Using Referenced Projects
Add or Remove a Reference to Another Project
View, Edit, or Run Referenced Project Files
Extract a Folder to Create a Referenced Project
Manage Referenced Project Changes Using Checkpoints
Compare Simulink Models
About Simulink Model Comparison
Creating Model Comparison Reports
Examples of Model Comparison
Using Model Comparison Reports
Select Simulink Models to Compare
Compare Simulink Models
Navigate the Simulink Model Comparison Report
Step Through Changes
Explore Changes in the Original Models
Merge Differences
Open Child Comparison Reports for Selected Nodes
Understand the Report Hierarchy and Matching
Filter Comparison Reports
Change Color Preferences
Save Comparison Results
Examples of Model Comparison
Limitations
Display Differences in Original Models
Highlighting in Models
Control Highlighting in Models
View Changes in Model Configuration Parameters
Merge Simulink Models from the Comparison Report
Resolve Conflicts Using Three-Way Model Merge
Use Three-Way Merge with External Source Control Tools
Open Three-Way Merge Without Using Source Control
Two-Way Model Merge
Merge MATLAB Function Block Code
Export, Print, and Save Model Comparison Results
Save Printable Report
Export Results to the Workspace
Comparing Models with Identical Names
Work with Referenced Models and Library Links
Compare Project or Model Templates
Compare Project Templates
Compare Model Templates
Simulink Model Comparison for GitHub Pull Requests
Prerequisites
Attach Diff Reports Using GitHub Actions
Notes
Design Evolution Management
Get Started with Design Evolution Manager
Key Terms and Concepts
Example Evolution Tree
About Design Evolutions
Evolutions and Evolution Trees
Manage Evolutions and Evolution Trees
Create Evolution Tree
Create Evolution
Lock Evolution
Get Evolution
Delete Evolutions
Managing Changes Made Outside the App
Inspect Properties, Compare, and Merge Evolutions
Inspect Properties of Evolution Tree, Evolutions, and Connectors
Compare and Merge Evolutions
Use Design Evolution Manager with the Fixed-Point Tool
Use Design Evolution Manager with Fixed-Point Tool
Large-Scale Modeling
Component-Based Modeling Guidelines
Should You Create Model Components?
Define Model Components
Explore Types of Model Components
Simulink Components
High-Level Component Selection Guidelines
Modeling Requirement Considerations
Compare Capabilities of Model Components
Collaboration
Reuse
Performance
Testing and Certification
Interface Design
Custom Behavior
Define Interfaces of Model Components
Identify Component Boundaries
Simplify Interfaces with Buses
Partition Interface Data
Configure Data Interfaces
Configuration Management
Manage Designs Using Source Control
Determine the Files Used by a Component
Manage Model Versions
Create Configurations
Power Window Example
Power Window
Power Window Control Project
Quantitative Requirements
Implement Activity Diagram: Power Window Control
Interactive Testing
Case 1: Window Up
Case 2: Window Auto-Up
Case 3: Driver-Side Precedence
Model Coverage
Create Model Using Model-Based Design
Automatic Code Generation for Control Subsystem
References
Schedule Editor
What are Partitions?
Create Partitions
Partitioning a Model
Create Partitions from a Rate-Based Model
Export-Function Partitions
Using the Schedule Editor
Using the Schedule Editor
Schedule the Partitions
Schedule an Export-Function Model Using the Schedule Editor
Schedule a Rate-Based Model Using the Schedule Editor
Generate Code from a Partitioned Model
Export-Function Conversion
Create and Analyze Random Schedules for a Model Using the Schedule Editor API
Events in Schedule Editor
Event Management in the Schedule Editor
Schedule Partitions with Events
Test Harness Generation
Limitations and Error Conditions
Software Modeling
Software Component Modeling
Create Models of Software Components
Create Model of Target Environment
Test System by Simulating Composition Model
Integrate Components into Software Architectures
Design Software Architectures
Generate Code for Software Components
Simulating Dynamic Systems
Running Simulations
Simulate a Model Interactively
Simulation Basics
Run, Pause, and Stop a Simulation
Use Blocks to Stop or Pause a Simulation
Use Local Solvers in Referenced Models
How Local Solvers Work
How to Configure Local Solvers
Additional Considerations for Local Solvers
Choose a Solver
Automatic Solver Selection
Solver Selection Criteria
Choose a Jacobian Method for an Implicit Solver
Sparsity of Jacobian
Solver Jacobian Methods
Heuristic 'auto' Method
Full and Sparse Perturbation Methods
Full and Sparse Analytical Methods
Code Generation Support
Variable Step Solvers in Simulink
Variable-Step Discrete Solver
Variable-Step Continuous Solvers
Variable-Step Continuous Explicit Solvers
Variable-Step Continuous Implicit Solvers
Error Tolerances for Variable-Step Solvers
Fixed Step Solvers in Simulink
Fixed-Step Discrete Solver
Fixed-Step Continuous Solvers
Choose a Fixed-Step Solver
When to Use a Fixed-Step Solver
Establish Baseline Results Using a Variable-Step Solver
Run Fixed-Step Simulations of the Model
Compare Fixed-Step Simulations with the Variable-Step Baseline
Use Model Operating Point for Faster Simulation Workflow
Save Model Operating Points
Restore Model Operating Points
Additional Considerations for Saving and Restoring Model Operating Points
Specify Initial State for Simulation
View Diagnostics
Toolbar
Diagnostic Message Pane
Trace Diagnostics Location
Identify Diagnostics from Custom Compilers
Suppress Diagnostics
Suggested Actions
Systematic Diagnosis of Errors and Warnings
Suppress Diagnostic Messages Programmatically
Suppress Diagnostic Messages Programmatically
Suppress Diagnostic Messages of a Referenced Model
Customize Diagnostic Messages
Display Custom Text
Create Hyperlinks to Files, Folders, or Blocks
Create Programmatic Hyperlinks
Report Diagnostic Messages Programmatically
Create Diagnostic Stages
Report Diagnostic Messages
Log Diagnostic Messages
View and Trace Callbacks in Models
Filters
Stage-Specific Callbacks
Search
Export
Trace Callbacks Programmatically
Running a Simulation Programmatically
Run Simulations Programmatically
Decide How to Run Programmatic Simulations
Run Simulations Using the sim Function
Run and Control Simulations by Issuing Simulation Commands
Run Parallel Simulations
How parsim works
Using sim Function Within parfor
Overview of Calling sim from Within parfor
Error Handling in Simulink Using MSLException
Error Reporting in a Simulink Application
The MSLException Class
Methods of the MSLException Class
Capturing Information About the Error
Multiple Simulations
Running Multiple Simulations
Multiple Simulations with Simulink Editor
Multiple Simulations with Parallel Computing Toolbox
Multiple Simulations with the sim Function
Multiple Simulations with Simulink.SimulationInput Object
Simulation Manager to Monitor Simulations
The parsim/batchsim Function Capabilities
Data Logging for Multiple Simulations
Run Parallel Simulations for a Thermal Model of a House Using parsim
Run Multiple Parallel Simulations with Different Set Points
View the Runs in the Simulation Manager
Comparison Between Multiple Simulation Workflows
parsim Workflow
batchsim Workflow
Analyze Results Using Simulation Manager
Open Simulation Manager
Add and Configure Plots
Save and Load Simulation Manager
Configure and Run Simulations with Multiple Simulations Panel
Workflow for Multiple Simulations Panel
Video Walkthrough
Multiple Simulations Panel: Simulate for Different Values of Stiffness for a Vehicle Dynamics System
Visualizing and Comparing Simulation Results
Prototype and Debug Models with Scopes
Scope Blocks and Scope Viewer Overview
Overview of Methods
Simulink Scope Versus Floating Scope
Simulink Scope Versus DSP System Toolbox Time Scope
Scope Trace Selection Panel
Scope Triggers Panel
What Is the Trigger Panel
Main Pane
Source/Type and Levels/Timing Panes
Hysteresis of Trigger Signals
Delay/Holdoff Pane
Cursor Measurements Panel
Scope Signal Statistics Panel
Scope Bilevel Measurements Panel
Bilevel Measurements
Settings
Transitions Pane
Overshoots / Undershoots Pane
Cycles Pane
Peak Finder Measurements Panel
Spectrum Analyzer Cursor Measurements Panel
Spectrum Analyzer Channel Measurements Panel
Spectrum Analyzer Distortion Measurements Panel
Spectral Masks
Set Up Spectral Masks
Check Spectral Masks
Spectrum Analyzer CCDF Measurements Panel
Common Scope Block Tasks
Connect Multiple Signals to a Scope
Save Simulation Data Using Scope Block
Pause Display While Running
Copy Scope Image
Plot an Array of Signals
Scopes in Referenced Models
Scopes Within an Enabled Subsystem
Modify x-axis of Scope
Show Signal Units on a Scope Display
Select Number of Displays and Layout
Dock and Undock Scope Window to MATLAB Desktop
View Values of Parameters Set as Variables
In-Place Parameter Value Display for Different Data Types
In-Place Parameter Value Display for Variables Defined in Multiple Workspaces
Turn Off In-Place Parameter Value Display
Floating Scope and Scope Viewer Tasks
Add Floating Scope Block to Model and Connect Signals
Add Scope Viewer to a Signal
Add Signals to an Existing Floating Scope or Scope Viewer
Save Simulation Data from Floating Scope
Add and Manage Viewers
Quickly Switch Visualization of Different Signals on a Floating Scope
Generate Signals Without Source Blocks
Attach Signal Generator
Modify Signal Generator Parameters
Remove Signal Generator
Viewers and Generators Manager
Open the Viewers and Generators Manager
Change Parameters
Connect Viewers and Generators
View Test Point Data
Customize Viewers and Generators Manager
Limitations
Control Scope Blocks Programmatically
Plot a Circle Using the XY Graph Block
Sample Time with Scope Blocks
Inspecting and Comparing Simulation Data
View Simulation Data in Simulation Data Inspector
View Logged Data
View Complex Data
View String Data
View Multidimensional Data
View Frame-Based Data
View Event-Based Data
Import Data from Workspace or File into Simulation Data Inspector
Import Data From Workspace
Import Data From File
Import Workspace Variables Using a Custom Data Reader
Import Data Using a Custom File Reader
View and Replay Map Data
Visualize Simulation Data on XY Plot
Analyze Data Using XY Plot
View Many Signals Together Using Sparklines
View Multidimensional Signals Using the Array Plot
Microsoft Excel Import, Export, and Logging Format
Basic File Format
Multiple Time Vectors
Signal Metadata
User-Defined Data Types
Complex, Multidimensional, and Bus Signals
Function-Call Signals
Simulation Parameters
Multiple Runs
Import Data from a CSV File into the Simulation Data Inspector
Basic File Format
Multiple Time Vectors
Signal Metadata
Import Data from a CSV File
Configure the Simulation Data Inspector
Logged Data Size and Location
Archive Behavior and Run Limit
Incoming Run Names and Location
Signal Metadata to Display
Signal Selection on the Inspect Pane
How Signals Are Aligned for Comparison
Colors Used to Display Comparison Results
Signal Grouping
Data to Stream from Parallel Simulations
Options for Saving and Loading Session Files
Signal Display Units
View Streaming Data in the Simulation Data Inspector
Open and Simulate the Model
Change Time Span
Control Plot Update Behavior
Hold Display
Control Display Scaling and Display Offset
Control Display of Streaming Data Using Triggers
Examine the Model
Interactively Generate Trigger Events
Capture Signal Transient Response
Stabilize a Steady-State Periodic Signal
Synchronize Cursors in the Simulation Data Inspector with an App Designer App
Open and Run the Cursors App
Examine the App Code
Iterate Model Design Using the Simulation Data Inspector
View and Inspect Signals During Simulation
Automatically Transfer View to Current Simulation
Control Data Retention
Visualize Many Logged Signals
Access Data in MATLAB Function During Simulation
Write Callback Function for Data Access
Configure Signals for Data Access
Analyze Multidimensional Signal Data
Convert Representation of Multidimensional Data
Plot Multidimensional Signal Data
Compare Multidimensional Signals
Convert Representation of Frame-Based Data
Analyze Data from Multiple Simulations
Open and Simulate the Model
Create and Save Views to Analyze Simulation Results
Load a View and Plot Signals Side by Side
Swap Source Run for Plotted Signals
Save and Share Simulation Data Inspector Data and Views
Save and Load Simulation Data Inspector Sessions
Share Simulation Data Inspector Views
Share Simulation Data Inspector Plots
Create Simulation Data Inspector Report
Export Data to Workspace or File
Export Video Signal to MP4 File
Create Interactive Comparison Reports
Create Plots Using the Simulation Data Inspector
Add Visualizations
Select Plot Layout
View Simulation Data Using Time Plot
Add Text to Plot Layout
Add Subplots to Visualize Data
Customize Time Plot Appearance
Customize Signal Appearance
Shade Signal Regions
Rename Signals
Inspect Simulation Data
Configure Signals for Logging
View Signals
View Signals on Multiple Plots
Zoom, Pan, and Resize Plots
Inspect Simulation Data Using Cursors
Replay Data
Inspect Metadata
Modify Signal Properties in the Simulation Data Inspector
Modify Signal Units
Modify Signal Data Type
Modify Signal Names
Replay Data in the Simulation Data Inspector
Compare Simulation Data
Setup
Compare Signals
Compare Runs
Configure Comparison Constraints
Cancel Comparisons
How the Simulation Data Inspector Compares Data
Signal Alignment
Synchronization
Interpolation
Tolerance Specification
Limitations
Inspect and Compare Data Programmatically
Create Run and View Data
Compare Two Signals in the Same Run
Compare Runs with Global Tolerance
Analyze Simulation Data Using Signal Tolerances
Keyboard Shortcuts for the Simulation Data Inspector
General Actions
Plot Zooming
Data Cursors
Signal Table
Import Dialog Box
Control Simulations with Interactive Displays
Tune and Visualize Your Model with Dashboard Blocks
Explore Connections Within the Model
Simulate Changing Model States
View Signal Data
Tune Parameters During Simulation
Getting Started with Panels
Open Example Model
Create Panels
Populate and Edit Panels
Manage Panel Visibility
Use Panels to Monitor Signals and Control Parameters
Open Example Model
Create Panels
Simulate Model
Create Tabbed Panels
Open Example Model
Create Panels
Add Empty Tab to Panel
Detach Tab from Panel
Attach Tab or Freestanding Panel to Another Panel
Reorder Panel Tabs
Create Dashboard Panel for Climate Control System
Design Custom Gauges
Design Custom Knobs
Design Custom Lamps
Design Custom Rocker, Slider, and Toggle Switches
Design Custom Buttons
Design Custom Rotary Switches
Design Custom Sliders
Analyzing Simulation Results
Decide How to Visualize Simulation Data
Simulation Data Inspector
Scope Blocks and the Scope Viewer
Record Block
Dashboard Blocks
Port Value Labels
Custom MATLAB Visualizations
Linearizing Models
Improving Simulation Performance and Accuracy
How Optimization Techniques Improve Performance and Accuracy
Speed Up Simulation
How Profiler Captures Performance Data
How Profiler Works
Start Profiler
Save Profiler Results
Check and Improve Simulation Accuracy
Check Simulation Accuracy
Unstable Simulation Results
Inaccurate Simulation Results
Modeling Techniques That Improve Performance
Accelerate the Initialization Phase
Reduce Model Interactivity
Reduce Model Complexity
Choose and Configure a Solver
Save the Model Operating Point
Use Performance Advisor to Improve Simulation Efficiency
Understanding Total Time and Self Time in Profiler Reports
Performance Advisor
Improve Simulation Performance Using Performance Advisor
Performance Advisor Workflow
Prepare Your Model
Create a Performance Advisor Baseline Measurement
Run Performance Advisor Checks
View and Respond to Results
View and Save Performance Advisor Reports
Perform a Quick Scan Diagnosis
Run Quick Scan on a Model
Checks in Quick Scan Mode
Improve vdp Model Performance
Enable Data Logging for the Model
Create Baseline
Select Checks and Run
Review Results
Apply Advice and Validate Manually
Use Hardware Acceleration to Speed Up Simulation for Object Detection
Solver Profiler
Examine Model Dynamics Using Solver Profiler
Zero-Crossing Events
Solver Exception Events
Tolerance-Exceeding Events
Newton Iteration Failures
Infinite State and Infinite Derivative Exceptions
Differential Algebraic Equation Failures
Solver Resets
Zero-Crossing
Discrete Signal
ZOH Signal
Block Signal
Initial Reset
Internal
Jacobian Logging and Analysis
Modify Solver Profiler Rules
Change Thresholds of Profiler Rules
Develop Profiler Rule Set
Customize State Ranking
Solver Profiler Interface
Toolstrip
Statistics Pane
Suggestions Pane
Debug Simulations
Simulink Debugging Programmatic Interface
Use Simulink Debugging Functions
Use MATLAB Functions
Understand Block and Method IDs
Set and Manage Breakpoints
Display Information About the Simulation
Display Information About the Model
Debug Simulation of Iterator Subsystem
Open Example Model
Add Port Value Labels
Set Breakpoint to Pause Within Time Step
Step Through Block Execution
Step into While-Iterator Subsystem
Pause on Specific Iteration
View Execution Order
End Simulation Debugging Session
Accelerating Models
What Is Acceleration?
How Acceleration Modes Work
Overview
Normal Mode
Accelerator Mode
Rapid Accelerator Mode
Code Regeneration in Accelerated Models
Determine If the Simulation Will Rebuild
Parameter Tuning in Rapid Accelerator Mode
Choosing a Simulation Mode
Simulation Mode Tradeoffs
Comparing Modes
Decision Tree
Design Your Model for Effective Acceleration
Select Blocks for Accelerator Mode
Select Blocks for Rapid Accelerator Mode
Control S-Function Execution
Accelerator and Rapid Accelerator Mode Data Type Considerations
Behavior of Scopes and Viewers with Rapid Accelerator Mode
Factors Inhibiting Acceleration
Perform Acceleration
Customize the Build Process
Run Acceleration Mode from the User Interface
Making Run-Time Changes
Switching Solvers between Runs
Interact with the Acceleration Modes Programmatically
Why Interact Programmatically?
Build JIT Accelerated Execution Engine
Control Simulation
Simulate Your Model
Customize the Acceleration Build Process
Comparing Performance
Performance When Target Must Be Rebuilt
Performance When Targets Are Up to Date
Analyze Performance of Simulation Modes
How to Improve Performance in Acceleration Modes
Techniques
C Compilers
Managing Blocks
Working with Blocks
Nonvirtual and Virtual Blocks
Specify Block Properties
Set Block Annotation Properties
Specify Block Callbacks
Specify Block Execution Order, Execution Priority and Tag
Use Block Description to Identify a Block
Create Block Annotations Programmatically
View Signal Values Using Port Value Labels
Add and Remove Port Value Labels
Configure Port Value Label Settings
Configure Port Value Labels for Buses
Understand Text Displayed in Port Value Labels
Additional Considerations for Using Port Value Labels
Control and Display Execution Order
Execution Order Viewer
Navigation from Blocks to Tasks
Execution Order Notation
Determining Execution Order
Check for Execution Order Changes Involving Data Store Memory Blocks
Access Block Data During Simulation
About Block Run-Time Objects
Access a Run-Time Object
Listen for Method Execution Events
Synchronizing Run-Time Objects and Simulink Execution
Working with Block Parameters
Set Block Parameter Values
Programmatically Access Parameter Values
Specify Parameter Values
Considerations for Other Modeling Goals
Share and Reuse Block Parameter Values by Creating Variables
Reuse Parameter Values in Multiple Blocks and Models
Define a System Constant
Set Variable Value by Using a Mathematical Expression
Control Scope of Parameter Values
Permanently Store Workspace Variables
Manage and Edit Workspace Variables
Package Shared Breakpoint and Table Data for Lookup Tables
Parameter Interfaces for Reusable Components
Referenced Models
Subsystems
Organize Related Block Parameter Definitions in Structures
Create and Use Parameter Structure
Store Data Type Information in Field Values
Control Field Data Types and Characteristics by Creating Parameter Object
Manage Structure Variables
Define Parameter Hierarchy by Creating Nested Structures
Group Multiple Parameter Structures into an Array
Create a Structure of Constant-Valued Signals
Considerations Before Migrating to Parameter Structures
Combine Existing Parameter Objects Into a Structure
Parameter Structures in the Generated Code
Parameter Structure Limitations
Package Shared Breakpoint and Table Data for Lookup Tables
Create Parameter Structure According to Structure Type from Existing C Code
Tune and Experiment with Block Parameter Values
Iteratively Adjust Block Parameter Value Between Simulation Runs
Tune Block Parameter Value During Simulation
Prepare for Parameter Tuning and Experimentation
Interactively Tune Using Dashboard Blocks
Which Block Parameters Are Tunable During Simulation?
Why Did the Simulation Output Stay the Same?
Tunability Considerations and Limitations for Other Modeling Goals
Optimize, Estimate, and Sweep Block Parameter Values
Sweep Parameter Value and Inspect Simulation Results
Store Sweep Values in Simulink.SimulationInput Objects
Capture and Visualize Simulation Results
Improve Simulation Speed
Sweep Parameter Values to Test and Verify System
Estimate and Calibrate Model Parameters
Tune and Optimize PID and Controller Parameters
Control Block Parameter Data Types
Reduce Maintenance Effort with Data Type Inheritance
Techniques to Explicitly Specify Parameter Data Types
Use the Model Data Editor for Batch Editing
Calculate Best-Precision Fixed-Point Scaling for Tunable Block Parameters
Detect Numerical Accuracy Issues Due to Quantization and Overflow
Reuse Custom C Data Types for Parameter Data
Data Types of Mathematical Expressions
Block Parameter Data Types in the Generated Code
Specify Minimum and Maximum Values for Block Parameters
Specify Parameter Value Ranges
Restrict Allowed Values for Block Parameters
Specify Range Information for Tunable Fixed-Point Parameters
Unexpected Errors or Warnings for Data with Greater Precision or Range than double
Optimize Generated Code
Switch Between Sets of Parameter Values During Simulation and Code Execution
Working with Lookup Tables
About Lookup Table Blocks
Anatomy of a Lookup Table
Guidelines for Choosing a Lookup Table
Data Set Dimensionality
Data Set Numeric and Data Types
Data Accuracy and Smoothness
Dynamics of Table Inputs
Efficiency of Performance
Summary of Lookup Table Block Features
Breakpoint and Table Size Features in Lookup Tables
Tunable Size
Symbolic Dimensions
Reusable Struct Data Types for Different Breakpoint and Table Array Sizes
Characteristics of Lookup Table Data
Sizes of Breakpoint Vectors and Table Data
Monotonicity of Breakpoints
Formulation of Evenly Spaced Breakpoints
Methods for Approximating Function Values
About Approximating Function Values
Interpolation Methods
Extrapolation Methods
Rounding Methods
Example Output for Lookup Methods
Use the Lookup Table Editor
Start the Lookup Table Editor
Edit Lookup Tables
Lookup Table Editor Limitations
Edit Lookup Table Data with Lookup Table Spreadsheet
Lookup Table Spreadsheet Data Type Support
Create Simulink.LookupTable Objects
How to Open the Simulink.LookupTable Object Property Dialog Box
Create Table and Breakpoint Data
View Multidimensional Slices of Data
Edit Table and Breakpoint Data with MATLAB Expressions
Edit Table and Breakpoint Data
Enable Heatmap for Table Data
Overflow Handling
Data Validation
Lookup Table Spreadsheet Tabular Interface Shortcuts
Enter Breakpoints and Table Data
Enter Data in Block Parameter Dialog Box
Enter Data in Lookup Table Editor
Enter Data for Multiple Lookup Tables in Lookup Table Editor
Enter Data Using Inports of Lookup Table Dynamic Block
Import Lookup Table Data from MATLAB
Import Standard Format Lookup Table Data
Propagate Standard Format Lookup Table Data
Import Nonstandard Format Lookup Table Data
Propagate Nonstandard Format Lookup Table Data
Copy and Paste Lookup Table Data from Excel
Import Lookup Table Data from Excel Using readtable
Visualize Data Through Plots
Generate Report of Lookup Table
Register Custom Lookup Table Blocks
Visualize Lookup Tables Visualized Through Lookup Table Control
Create a Logarithm Lookup Table
Prelookup and Interpolation Blocks
Optimize Generated Code for Lookup Table Blocks
Remove Code That Checks for Out-of-Range Inputs
Optimize Breakpoint Spacing in Lookup Tables
Reduce Data Copies for Lookup Table Blocks
Efficient Code for Row-Major Array Layout
Row-Major Algorithm in Existing Models Containing Lookup Table Blocks
Update Lookup Table Blocks to New Versions
Comparison of Blocks with Current Versions
Compatibility of Models with Older Versions of Lookup Table Blocks
How to Update Your Model
What to Expect from the Model Advisor Check
Working with Block Masks
Masking Fundamentals
Masking Terminology
Create a Simple Mask
Manage Existing Masks
Change a Block Mask
View Mask Parameters
Look Under Block Mask
Remove Mask
Mask Callback Code
Add Mask Code
Execute Drawing Command
Execute Initialization Command
Execute Callback Code
Mask Display and Initialization Commands
Initialize Mask
Dialog Variables
Initialization Code
Mask Initialization Best Practices
Promote Block Parameters on a Mask
Control Masks Programmatically
Pass Values to Blocks Under the Mask
Parameter Promotion
Mask Initialization
Referencing Block Parameters Using Variable Names
Mask Linked Blocks
Guidelines for Mask Parameters
Mask Behavior for Masked, Linked Blocks
Mask a Linked Block
Dynamic Mask Dialog Box
Dynamic Masked Subsystem
Debug Masks That Use MATLAB Code
Code Written in Mask Editor
Code Written Using MATLAB Editor/Debugger
Introduction to System Mask
Create and Reference a Masked Model
Step 1: Define Mask Arguments
Step 2: Create Model Mask
Step 3: View System Mask Parameters
Step 4: Reference Masked Model
Create and Display System Mask Programmatically
Handling Large Number of Mask Parameters
Customize Tables for Masked Blocks
Adding a Custom Table Parameter
Control Custom Table Programmatically
Add Images in Masks
Store Mask Images Programmatically
Create Hierarchical List in Mask Dialog
Validating Mask Parameters Using Constraints
Create and Associate a Constraint
Create a Cross-Parameter Constraint
Rule Attributes
Support Constraints on Literal Edit Parameters
Custom Constraint for Mask Parameter
Share Parameter Constraints Across Multiple Block Masks
Control Constraints Programmatically
Define Measurement Units for Masked Blocks
Masking Example Models
Create a Custom Table in the Mask Dialog
Create a Block Mask Icon
Mask a Variant Subsystem
Tune Mask Enumeration Parameters - Popup and Radio Button
Visualize and Plot N-Dimensional Data Using Mask Lookup Table Control
Validate Input and Output Port Signals Using Port Constraints
Graphical Icon Editor Overview
Edit Properties of Block Mask Icon and Its Elements
Create and Edit Block Mask Icon
Add Dynamic Behavior to Masked Icons
Render Multiple Variations of Same Block Icon Using Parts
Hide or Unhide Elements in the Icon Based on Block Parameters or Mask Parameters
Position Elements Relatively Using Layout Constraints
Text Parameterization
Display Elements That Fit Size of Icon
Validate Port Signals Among Ports of the Same Masked Block
Draw Mask Icon Using Drawing Commands
Unsafe Mask Callback Error
Organize Mask Initialization and Callbacks in a MATLAB File
Simulink Masking Examples
Manage Interface Connector with Mask Initialization and Block Callbacks
Unsafe Nested Callback
Preserve Tunability of Parameters That Are Modified or Created in Mask Initialization
Creating Custom Blocks
Types of Custom Blocks
MATLAB Function Blocks
MATLAB System Blocks
Subsystem Blocks
C Caller Block
C Function Block
S-Function Blocks
Masked Blocks
Comparison of Custom Block Functionality
Model State Behavior
Simulation Performance
Code Generation
Multiple Input and Output Ports
Speed of Updating the Simulink Diagram
Callback Methods
Comparing MATLAB S-Functions to MATLAB Functions for Code Generation
Expanding Custom Block Functionality
Design and Create a Custom Block
Setup Working Environment to Design and Create a Custom Block
How to Design a Custom Block
Defining Custom Block Behavior
Deciding on a Custom Block Type
Placing Custom Blocks in a Library
Adding a User Interface to a Custom Block
Adding Block Functionality Using Block Callbacks
Integrate Python GPS Text Message Parsing Algorithms in Simulink
Working with Block Libraries
Create Custom Library
Data Dictionary for Custom Libraries
Blocks for Custom Libraries
Annotations in Custom Libraries
Lock and Unlock Libraries
Prevent Disabling of Library Links
Add Libraries to Library Browser
Add Library to Library Browser
Add Sublibrary to Library Browser
Specify Library Order in Library List
Linked Blocks
Rules for Linked Blocks
Linked Block Terminology
Parameterized Links and Self-Modifiable Linked Subsystems
Parameterized Links
Self-Modifiable Linked Subsystems
Create a Self-Modifiable Library Block
Display Library Links
Disable or Break Links to Library Blocks
Break Links
Lock Links to Blocks in a Library
Rules for Locked Links
Restore Disabled Links
Restore Disabled Links Individually
Restore Disabled Links Hierarchically
Restore Parameterized Links
Fix Unresolved Library Links
Install Missing Product
Resolve Path to Source Block
Specify Unresolved Block Details for Custom Libraries
Control Linked Block Programmatically
Linked Block Information
Lock Linked Blocks
Link Status
Maintain Compatibility of Library Blocks Using Forwarding Tables
Forwarding Table Entry for a Renamed Block
Move Block from One Library to Another
Add or Remove Parameters from the Block
Split Block Functionality
Create Mask Parameter Aliases
Integrating Custom C/C++ Code
Specify and Configure Custom C/C++ Code
Configure Custom Code
Specify Relative Paths to Custom Code
Debug Custom C/C++ Code
In-Process and Out-of-Process Simulation
Integrate C Code in Simulink Models
Integrate C Code Using C Caller Blocks
Specify Source Code and Dependencies
N-D Array Handling
Call C Caller Block and Specify Ports
Map C Function Arguments to Simulink Ports
Create a FunctionPortSpecification Object and Edit C Caller Block Properties
Create a Custom C Caller Library
Debug Custom Code
Generate Code from Model
Limitations
Use C Caller Block with Conditional Execution
Integrate Algorithms Using C Function Blocks
Integrate External C/C++ Code into Simulink Using C Function Blocks
Write External Source Files
Enter the External Code Into Simulink
Specify Simulation or Code Generation Code
Specify Declaration for Target-Specific Function for Code Generation
Interface with C++ Classes Using C Function Block
Create Source Code Files
Configure the C Function Block
Limitations
Modify States of a C Function Block Using Persistent Symbols
Change Values of Signals Using C Function Block and Buses
Access Elements of a Matrix Using Output Code in a C Function Block
Use External Functions with Matrix Input in a C Function Block
Define an Alias Type in a C Function Block
Use Enumerated Data in a C Function Block
Use Inherited Sizes in a C Function Block
Call a Legacy Lookup Table Function Using C Caller block
Start and Terminate Actions Within a C Function Block
Call C++ Class Methods Using a C-style Wrapper Function from a C Function Block
Call C++ Class Methods Directly from a C Function Block
Call Legacy Lookup Table Functions Using C Function Block
Use C Function Block Within For Each Subsystem
Simulink Code Importer
Import Custom Code Using the Simulink Code Importer Wizard
Using the MATLAB Function Block
Implement MATLAB Functions in Simulink with MATLAB Function Blocks
Calculate Mean and Standard Deviation with a MATLAB Function Block
Program the MATLAB Function Block
Check Properties for MATLAB Function Block Variables
Build the Function
Prepare the Block for Code Generation
Configure MATLAB Function Blocks Programmatically
Call MATLAB Function Objects
Programmatically Configure Block Properties
Access Block Inputs, Outputs, and Properties
Programmatically Access MATLAB Function Reports
Code Generation Readiness Tool
Issues Tab
Files Tab
Check Code Using the Code Generation Readiness Tool
Run Code Generation Readiness Tool at the Command Line
Run the Code Generation Readiness Tool From the Current Folder Browser
Debug MATLAB Function Blocks
Debug an Example Function
Set Conditions on Breakpoints
Watch Function Variables During Simulation
Check for Data Range Violations
Debug MATLAB Function Blocks in Initialize Function and Terminate Function Blocks
Prevent Algebraic Loop Errors in MATLAB Function, Chart, and Truth Table Blocks
Manage Function Call Outputs of a MATLAB Function Block
Create Function Call Outputs
Enable a Function-Call Subsystem with a MATLAB Function Block
Considerations When Triggering Function-Call Subsystems
Set Function Call Output Properties
Manage the Input Trigger of a MATLAB Function Block
Create an Input Trigger
Enable a MATLAB Function Block with an Input Trigger
Set Input Trigger Properties
Create and Define MATLAB Function Block Variables
Create and Delete MATLAB Function Block Variables
Set General Variable Properties
Set Limit Range Properties
Set Description Properties
Programmatically Create Variables
Specify MATLAB Function Block Properties
MATLAB Function Block Properties
Fixed-Point Properties
Description and Document Link Properties
Programmatically Specify Block Properties
MATLAB Function Reports
Open a MATLAB Function Report
Analyze MATLAB Source Code
View Error and Warning Messages
View MATLAB Variables
Report Limitations
Define and Modify Variable Data Types
Specify Variable Data Types
Inheriting Data Types
Built-In Data Types
Fixed-Point Designer Data Type Properties
Specify Data Types with Expressions
Programmatically Change Variable Data Types
Specify Size of MATLAB Function Block Variables
Inherit Size from Simulink
Customize Variable Sizes
Custom Size Property Example
Simulation and Size Matching
Configure MATLAB Function Block Parameter Variables
Control Parameter Variables with Masks
Control Parameter Variables in Workspaces
Resolve Signal Objects for Output Variables
Implicit Signal Resolution
Eliminating Warnings for Implicit Signal Resolution in the Model
Disabling Implicit Signal Resolution for a MATLAB Function Block
Forcing Explicit Signal Resolution for an Output Signal
Attach Buses to MATLAB Function Blocks
Read and Write Buses with a MATLAB Function Block
Write Buses From Data Store Memory to a MATLAB Function Block
Index Substructures and Fields
Create Structures in MATLAB Function Blocks
Input Variables
Output Variables
Local Variables
Persistent Variables
Parameter Variables
Global Variables
Assign Values to Structures and Fields
Limitations for Structures in MATLAB Function Blocks
Initialize Matrix Using a Nontunable Structure Parameter
Declare Variable-Size MATLAB Function Block Variables
Output Variables
Other Scope Types
Use a Variable-Size Signal in a Filtering Algorithm
Control Memory Allocation for Variable-Size Arrays in a MATLAB Function Block
Provide Upper Bounds for Variable-Size Arrays
Disable Dynamic Memory Allocation for MATLAB Function Blocks
Modify the Dynamic Memory Allocation Threshold
Use Dynamic Memory Allocation for Variable-Size Arrays in a MATLAB Function Block
Configure Model for Dynamic Memory Allocation
Create Model
Simulate Model Using Dynamic Memory Allocation
Use Dynamic Memory Allocation for Bounded Arrays
Generate C Code That Uses Dynamic Memory Allocation
Code Generation for Enumerations
Define Enumerations for MATLAB Function Blocks
Allowed Operations on Enumerations
MATLAB Toolbox Functions That Support Enumerations
Add Enumerated Inputs, Outputs, and Parameters to a MATLAB Function Block
Enumerations in a MATLAB Function Block
Use Global Data in MATLAB Function Blocks
Use Global Data from Data Store Memory Blocks
Use Global Data from Simulink.Signal Objects
Choose How to Store Global Data
Retrieve Data From Data Store Memory Blocks
Retrieve Data From Simulink.Signal Objects Example
Using Data Store Diagnostics to Detect Memory Access Issues
Initialize Persistent Variables in MATLAB Functions
MATLAB Function Block with No Direct Feedthrough
State Control Block in Synchronous Mode
Stateflow Chart Implementing Moore Semantics
Run Simulations and Generate Code with Masked Library Subsystems Containing MATLAB Function Blocks
Include MATLAB Code as Comments in Generated Code
How to Include MATLAB Code as Comments in the Generated Code
Location of Comments in Generated Code
Including MATLAB user comments in Generated Code
Limitations of MATLAB Source Code as Comments
Integrate C Code by Using the MATLAB Function Block
Call C Code from a Simulink Model
Use coder.ceval in an Example MATLAB Function Block
Control Imported Bus and Enumeration Type Definitions
Control Run-Time Checks
Types of Run-Time Checks
When to Disable Run-Time Checks
How to Disable Run-Time Checks
Call MATLAB Function Files in MATLAB Function Blocks
Interface with Row-Major Data in MATLAB Function Block
Row-Major Layout in Simulation and Code Generation
Array Layout Conversions
Array Layout and Algorithmic Efficiency
Row-Major Layout for N-Dimensional Arrays
Specify Array Layout in External Function Calls
Code and Integration Limitations for MATLAB Function Blocks
Use Supported Functions
Prepare Variables for Code Generation
Use Nondirect Feedthrough in a MATLAB Function Block
System Objects in Simulink
MATLAB System Block
Why Use the MATLAB System Block?
Choosing the Right Block Type
System Objects
Interpreted Execution or Code Generation
Default Input Signal Attributes
MATLAB System Block Limitations
MATLAB System and System Objects Examples
Implement a MATLAB System Block
Understanding the MATLAB System Block
Change Blocks Implemented with System Objects
Call Simulink Functions from MATLAB System Block
Create a Simulink Function Block
Create a MATLAB System Block and Define System Object
Call a Simulink Function in a Subsystem from a MATLAB System Block
Call Simulink Functions from a MATLAB System Block
Specify Sample Time for MATLAB System Block
Types of Sample Time for MATLAB System Block
Change Block Icon and Port Labels
Modify MATLAB System Block Dialog
Change the MATLAB System Block Icon to an Image
Nonvirtual Buses and MATLAB System Block
Use System Objects in Feedback Loops
Simulation Modes
Interpreted Execution vs. Code Generation
Simulation Using Code Generation
Mapping System Object Code to MATLAB System Block Dialog Box
System Object to Block Dialog Box Default Mapping
System Object to Block Dialog Box Custom Mapping
Considerations for Using System Objects in Simulink
Variable-Size Signals
Tunable Parameters
System Objects as Properties
Default Property Values
System Objects in For Each Subsystems
Input Validation
Simulink Engine Interaction with System Object Methods
Simulink Engine Phases Mapped to System Object Methods
Add and Implement Propagation Methods
When to Use Propagation Methods
Implement Propagation Methods
Share Data with Other Blocks
Setup Working Environment to Share System Object Data with Other Blocks
Data Sharing with the MATLAB System Block
Choose How to Store Shared Data
How to Use Data Store Memory Blocks for the MATLAB System Block
How to Set Up Simulink.Signal Objects
Using Data Store Diagnostics to Detect Memory Access Issues
Limitations of Using Shared Data in MATLAB System Blocks
Use Shared Data with P-Coded System Objects
Troubleshoot System Objects in Simulink
Class Not Found
Error Invoking Object Method
Performance
Customize MATLAB System Block Dialog
Break Algebraic Loops
Customize MATLAB System Block Appearance
Implement a Simple Algorithm
Specify Output Characteristics of MATLAB System Block
Customize System Block Appearance Programmatically
Specify Input and Output Names
Add Text to Block Icon
Add Image to Block Icon
Customize MATLAB System Icon and Dialog Box Using Mask Editor
Create and Customize MATLAB System Icon and Dialog Box Using Mask Editor
Customize System Block Dialog Box Programmatically
Define Block Dialog Tabs, Sections, and Order of Properties
Define Property Sections
Add Header Description
Control Simulation Type in MATLAB System Block
Add Custom Button to MATLAB System Block
Specify Output
Set Output Size
Set Fixed- or Variable-Size Output
Set Output Data Type
Set Output Complexity
Set Discrete State Output Specification
Set Model Reference Discrete Sample Time Inheritance
Use Update and Output for Nondirect Feedthrough
Enable For Each Subsystem Support
Define System Object for Use in Simulink
Develop System Object for Use in MATLAB System Block
Define Block Dialog Box for Plot Ramp
Use Global Variables in System Objects
System Object Global Variables in MATLAB
System Object Global Variables in Simulink
System Design in Simulink Using System Objects
System Design and Simulation in Simulink
Define New System Objects for Use in Simulink
Test New System Objects in MATLAB
Add System Objects to Your Simulink Model
Specify Sample Time for MATLAB System Block System Objects
Create Moving Average Filter Block with System Object
Process Message Payload Using MATLAB System Block
Call Python Function Using MATLAB Function and MATLAB System Block
Convert Moving Target MATLAB Code to a Simulink Model
Integrate Python Packages to Parse NMEA GPS Messages Using Python Importer
Integrate Python Functions Specified Within Classes Using Python Importer
Manage and Create a Blockset Using Blockset Designer
Create a Blockset Project
Create a New Blockset Project
Create a Project from an Existing Blockset
Blockset Project File Structure
Create and Organize Block Artifacts
Add Tests to Blocks
Document the Blocks
S-Function Related Artifacts
Publish the Created Blockset
FMUs and Co-Simulation in Simulink
Import FMUs
FMU XML File Directives
Additional Support and Limitations
FMU Import Examples
Implement an FMU Block
Explore the FMU Block
Change Block Input, Output, Parameter and Internal Variable Structures
Timing Considerations
Troubleshooting FMUs
Export a Model as a Tool-Coupling FMU
Include Tunable Parameters for Tool-Coupling FMU
Use Protected Model to Conceal Content
Use the Exported Tool-Coupling FMU
Co-Simulation Execution
Execution Timing
Numerical Compensation
Numerical Compensation Prerequisites
Manage Numerical Compensation Options Using the Dialog
Manage Numerical Compensation Options from the Command Line
Numerical Compensation Limitations
Run Co-Simulation Components on Multiple Cores
Singlethreaded Versus Multithreaded Simulations
Using Multithreaded Simulation to Speed up Simulation on Multiple Cores
Using the MultithreadedSim Parameter
Configuring S-Function Blocks to Run Single or Multithreaded
Co-Simulation on Multiple Threads Limitations and Guidelines
Simulink Community and Connection Partner Program
FMU Block Calling Sequences
Co-Simulation Call Sequence for FMI Version 1.0
Model Exchange Call Sequence for FMI Version 1.0
Co-Simulation Call Sequence for FMI Version 2.0
Model Exchange Call Sequence for FMI Version 2.0
Co-Simulation Call Sequence for FMI Version 3.0
Model Exchange Call Sequence for FMI Version 3.0
Design Considerations for C/C++ Code Generation
When to Generate Code from MATLAB Algorithms
When Not to Generate Code from MATLAB Algorithms
Which Code Generation Feature to Use
Prerequisites for C/C++ Code Generation from MATLAB
MATLAB Code Design Considerations for Code Generation
See Also
Differences Between Generated Code and MATLAB Code
Functions that have Multiple Possible Outputs
Passing Input Argument Name at Run Time
Empty Repeating Input Argument
Output Argument Validation of Conditionally-Assigned Outputs
Writing to ans Variable
Logical Short-Circuiting
Loop Index Overflow
Indexing for Loops by Using Single Precision Operands
Index of an Unentered for Loop
Character Size
Order of Evaluation in Expressions
Name Resolution While Constructing Function Handles
Termination Behavior
Size of Variable-Size N-D Arrays
Size of Empty Arrays
Size of Empty Array That Results from Deleting Elements of an Array
Growing Variable-Size Column Cell Array That is Initialized as Scalar at Run Time
Binary Element-Wise Operations with Single and Double Operands
Floating-Point Numerical Results
NaN and Infinity
Negative Zero
Code Generation Target
MATLAB Class Property Initialization
MATLAB Classes in Nested Property Assignments That Have Set Methods
MATLAB Handle Class Destructors
Variable-Size Data
Complex Numbers
Converting Strings with Consecutive Unary Operators to double
Display Function
MATLAB Language Features Supported for C/C++ Code Generation
MATLAB Features That Code Generation Supports
MATLAB Language Features That Code Generation Does Not Support
Functions, Classes, and System Objects Supported for Code Generation
Functions and Objects Supported for C/C++ Code Generation
System Objects Supported for Code Generation
Code Generation for System Objects
Defining MATLAB Variables for C/C++ Code Generation
Variables Definition for Code Generation
Best Practices for Defining Variables for C/C++ Code Generation
Explicitly Define Variables Before Using Them
Use Caution When Reassigning Variable Properties
Define Variable Numeric Data Types
Define Matrices Before Assigning Indexed Variables
Aim to Index Arrays by Using Fixed-Size Vectors
Eliminate Redundant Copies of Variables in Generated Code
When Redundant Copies Occur
How to Eliminate Redundant Copies by Defining Uninitialized Variables
Defining Uninitialized Variables
Reassignment of Variable Properties
Reuse the Same Variable with Different Properties
When You Can Reuse the Same Variable with Different Properties
When You Cannot Reuse Variables
Limitations of Variable Reuse
Supported Variable Types
Edit and Represent Coder Type Objects and Properties
Object Properties
Legacy Representation of Coder Type Objects
Defining Data for Code Generation
Data Definition Considerations for Code Generation
Code Generation for Complex Data
Restrictions When Defining Complex Variables
Code Generation for Complex Data with Zero-Valued Imaginary Parts
Results of Expressions That Have Complex Operands
Results of Complex Multiplication with Nonfinite Values
Encoding of Characters in Code Generation
Array Size Restrictions for Code Generation
Code Generation for Constants in Structures and Arrays
Code Generation for Strings
Limitations
Differences Between Generated Code and MATLAB Code
Code Generation for Sparse Matrices
Code Generation Guidelines
Code Generation Limitations
Specify Array Layout in Functions and Classes
Specify Array Layout in a Function
Query Array Layout of a Function
Specify Array Layout in a Class
Code Design for Row-Major Array Layout
Linear Indexing Uses Column-Major Array Layout
Generate Code for Growing Arrays and Cell Arrays with end + 1 Indexing
Grow Array with (end + 1) Indexing
Grow Cell Array with {end + 1} Indexing
Code Generation for Variable-Size Data
Code Generation for Variable-Size Arrays
Memory Allocation for Variable-Size Arrays
Enabling and Disabling Support for Variable-Size Arrays
Variable-Size Arrays in a MATLAB Function Report
Control Dynamic Memory Allocation for Fixed-Size Arrays
Enable Dynamic Memory Allocation for Fixed-Size Arrays
Set Dynamic Memory Allocation Threshold for Fixed-Size Arrays
Generate Code for Fixed-Size Arrays
Usage Notes and Limitations
Specify Upper Bounds for Variable-Size Arrays
Specify Upper Bounds for MATLAB Function Block Inputs and Outputs
Specify Upper Bounds for Local Variables
Define Variable-Size Data for Code Generation
Use a Matrix Constructor with Nonconstant Dimensions
Assign Multiple Sizes to the Same Variable
Growing an Array by Using (end + 1)
Define Variable-Size Data Explicitly by Using coder.varsize
Diagnose and Fix Variable-Size Data Errors
Diagnosing and Fixing Size Mismatch Errors
Diagnosing and Fixing Errors in Detecting Upper Bounds
Incompatibilities with MATLAB in Variable-Size Support for Code Generation
Incompatibility with MATLAB for Scalar Expansion
Incompatibility with MATLAB in Determining Size of Variable-Size N-D Arrays
Incompatibility with MATLAB in Determining Size of Empty Arrays
Incompatibility with MATLAB in Determining Class of Empty Arrays
Incompatibility with MATLAB in Matrix-Matrix Indexing
Incompatibility with MATLAB in Vector-Vector Indexing
Incompatibility with MATLAB in Matrix Indexing Operations for Code Generation
Incompatibility with MATLAB in Concatenating Variable-Size Matrices
Differences When Curly-Brace Indexing of Variable-Size Cell Array Inside Concatenation Returns No Elements
Variable-Sizing Restrictions for Code Generation of Toolbox Functions
Common Restrictions
Toolbox Functions with Restrictions for Variable-Size Data
Generate Code With Implicit Expansion Enabled
Output Size
Additional Code Generation
Performance Variation
Optimize Implicit Expansion in Generated Code
Disable Implicit Expansion in Specified Function by Using coder.noImplicitExpansionInFunction
Disable Implicit Expansion for Specific Binary Operation by Using coder.sameSizeBinaryOp
Disable Implicit Expansion in your Project
Representation of Arrays in Generated Code
Customize Interface Generation
Control Memory Allocation for Fixed-Size Arrays
Enable Dynamic Memory Allocation for All Fixed-Size Arrays
Enable Dynamic Memory Allocation for Arrays Bigger Than a Threshold
Resolve Error: Size Mismatches
Issue
Possible Solutions
Code Generation for MATLAB Structures
Structure Definition for Code Generation
Structure Operations Allowed for Code Generation
Define Scalar Structures for Code Generation
Restrictions When Defining Scalar Structures by Assignment
Adding Fields in Consistent Order on Each Control Flow Path
Restriction on Adding New Fields After First Use
Define Arrays of Structures for Code Generation
Ensuring Consistency of Fields
Using repmat to Define an Array of Structures with Consistent Field Properties
Defining an Array of Structures by Using struct
Defining an Array of Structures Using Concatenation
Index Substructures and Fields
Assign Values to Structures and Fields
Pass Large Structures as Input Parameters
Code Generation for Cell Arrays
Code Generation for Cell Arrays
Homogeneous vs. Heterogeneous Cell Arrays
Controlling Whether a Cell Array Is Homogeneous or Heterogeneous
Cell Arrays in Reports
Control Whether a Cell Array Is Variable-Size
Cell Array Limitations for Code Generation
Cell Array Element Assignment
Variable-Size Cell Arrays
Definition of Variable-Size Cell Array by Using cell
Cell Array Indexing
Growing a Cell Array by Using {end + 1}
Cell Array Contents
Passing Cell Arrays to External C/C++ Functions
Use in MATLAB Function Block
Code Generation for Categorical Arrays
Code Generation for Categorical Arrays
Define Categorical Arrays for Code Generation
Allowed Operations on Categorical Arrays
MATLAB Toolbox Functions That Support Categorical Arrays
Define Categorical Array Inputs
Define Categorical Array Inputs at the Command Line
Representation of Categorical Arrays
Categorical Array Limitations for Code Generation
Code Generation for Datetime Arrays
Code Generation for Datetime Arrays
Define Datetime Arrays for Code Generation
Allowed Operations on Datetime Arrays
MATLAB Toolbox Functions That Support Datetime Arrays
Define Datetime Array Inputs
Define Datetime Array Inputs at the Command Line
Representation of Datetime Arrays
Datetime Array Limitations for Code Generation
Code Generation for Duration Arrays
Code Generation for Duration Arrays
Define Duration Arrays for Code Generation
Allowed Operations on Duration Arrays
MATLAB Toolbox Functions That Support Duration Arrays
Define Duration Array Inputs
Define Duration Array Inputs at the Command Line
Representation of Duration Arrays
Duration Array Limitations for Code Generation
Code Generation for Tables
Code Generation for Tables
Define Tables for Code Generation
Allowed Operations on Tables
MATLAB Toolbox Functions That Support Tables
Define Table Inputs
Define Table Inputs at the Command Line
Representation of Tables
Table Limitations for Code Generation
Creating Tables Limitations
Modifying Tables Limitations
Using Table Functions Limitations
Code Generation for Timetables
Code Generation for Timetables
Define Timetables for Code Generation
Allowed Operations on Timetables
MATLAB Toolbox Functions That Support Timetables
Define Timetable Inputs
Define Timetable Inputs at the Command Line
Representation of Timetables
Timetable Limitations for Code Generation
Creating Timetables Limitations
Modifying Timetables Limitations
Using Timetable Functions Limitations
Code Generation for MATLAB Classes
MATLAB Classes Definition for Code Generation
Language Limitations
Code Generation Features Not Compatible with Classes
Defining Class Properties for Code Generation
Inheritance from Built-In MATLAB Classes Not Supported
Classes That Support Code Generation
Generate Code for MATLAB Value Classes
Generate Code for MATLAB Handle Classes and System Objects
Code Generation for Handle Class Destructors
Guidelines and Restrictions
Behavioral Differences of Objects in Generated Code and in MATLAB
Class Does Not Have Property
Solution
Passing By Reference Not Supported for Some Properties
Handle Object Limitations for Code Generation
A Variable Outside a Loop Cannot Refer to a Handle Object Allocated Inside a Loop
A Handle Object That a Persistent Variable Refers To Must Be a Singleton Object
References to Handle Objects Can Appear Undefined
System Objects in MATLAB Code Generation
Usage Rules and Limitations for System Objects for Generating Code
System Objects in codegen
System Objects in the MATLAB Function Block
System Objects in the MATLAB System Block
System Objects and MATLAB Compiler Software
Work Around Language Limitation: Code Generation Does Not Support Object Arrays
Issue
Possible Solutions
Code Generation for Function Handles
Function Handle Limitations for Code Generation
Defining Functions for Code Generation
Code Generation for Variable Length Argument Lists
Generate Code for arguments Block That Validates Input and Output Arguments
Supported Features
Names Must Be Compile-Time Constants
Using the Structure That Holds Name-Value Arguments
Differences Between Generated Code and MATLAB Code
Code Generation for Anonymous Functions
Anonymous Function Limitations for Code Generation
Code Generation for Nested Functions
Nested Function Limitations for Code Generation
Calling Functions for Code Generation
Resolution of Function Calls for Code Generation
Key Points About Resolving Function Calls
Compile Path Search Order
When to Use the Code Generation Path
Resolution of File Types on Code Generation Path
Compilation Directive %#codegen
Use MATLAB Engine to Execute a Function Call in Generated Code
When To Declare a Function as Extrinsic
Use the coder.extrinsic Construct
Call MATLAB Functions Using feval
Working with mxArrays
Restrictions on Using Extrinsic Functions
Code Generation for Recursive Functions
Compile-Time Recursion
Run-Time Recursion
Disallow Recursion
Disable Run-Time Recursion
Recursive Function Limitations for Code Generation
Force Code Generator to Use Run-Time Recursion
Treat the Input to the Recursive Function as a Nonconstant
Make the Input to the Recursive Function Variable-Size
Assign Output Variable Before the Recursive Call
Avoid Duplicate Functions in Generated Code
Issue
Cause
Solution
Improve Run-Time Performance of MATLAB Function Block
Avoid Data Copies of Function Inputs in Generated Code
Inline Code
Unroll for-Loops and parfor-Loops
Force for-Loop Unrolling by Using coder.unroll
Generate Reusable Code
LAPACK Calls for Linear Algebra in a MATLAB Function Block
BLAS Calls for Matrix Operations in a MATLAB Function Block
FFTW calls for fast Fourier transform functions in a MATLAB Function Block
Troubleshooting MATLAB Code in MATLAB Function Blocks
Compile-Time Recursion Limit Reached
Issue
Cause
Solutions
Force Run-Time Recursion
Increase the Compile-Time Recursion Limit
Output Variable Must Be Assigned Before Run-Time Recursive Call
Issue
Cause
Solution
Unable to Determine That Every Element of Cell Array Is Assigned
Issue
Cause
Solution
Nonconstant Index into varargin or varargout in a for-Loop
Issue
Cause
Solution
Unknown Output Type for coder.ceval
Issue
Cause
Solution
Managing Data
Working with Data
About Data Types in Simulink
Data Typing Guidelines
Data Type Propagation
Data Types Supported by Simulink
Block Support for Data and Signal Types
Control Data Types of Signals
Entering Valid Data Type Values
Use the Model Data Editor for Batch Editing
Share a Data Type Between Separate Algorithms, Data Paths, Models, and Bus Elements
Reuse Custom C Data Types for Signal Data
Determine Data Type of Signal That Uses Inherited Setting
Data Types Remain double Despite Changing Settings
Validate a Floating-Point Embedded Model
Explore the Model
Validate a Single-Precision Model
Blocks That Support Single Precision
Fixed-Point Numbers
Binary Point Interpretation
Signed Fixed-Point Numbers
Benefits of Using Fixed-Point Hardware
Scaling, Precision, and Range
Scaling
Precision
Range
Fixed-Point Data in MATLAB and Simulink
Fixed-Point Data in Simulink
Fixed-Point Data in MATLAB
Scaled Doubles
Share Fixed-Point Models
Control Fixed-Point Instrumentation and Data Type Override
Control Instrumentation Settings
Control Data Type Override
Instrumentation Settings and Data Type Override for a Model Reference Hierarchy
Specify Fixed-Point Data Types
Overriding Fixed-Point Specifications
Specify Data Types Using Data Type Assistant
Specifying a Fixed-Point Data Type
Specify an Enumerated Data Type
Specify a Bus Object Data Type
Specify an Image Data Type
Specify a Value Type
Data Types for Buses
Simulink Strings
String Constants
Simulink Strings and Null Characters
String Data Type
Strings in Bus Objects
Strings and Generated Code
String Data Type Conversions
Display and Extract Coordinate Data
Find Patterns in Strings
Extract a String
Get Text Following a Keyword
Change Existing Models to Use Strings
Parse NMEA GPS Text Message
Simulink String Limitations
Data Objects
Data Class Naming Conventions
Use Data Objects in Simulink Models
Data Object Properties
Create Data Objects from Built-In Data Class Package Simulink
Create Data Objects from Another Data Class Package
Create Data Objects Directly from Dialog Boxes
Create Data Objects for a Model Using Data Object Wizard
Create Data Objects from External Data Source Programmatically
Data Object Methods
Handle Versus Value Classes
Compare Data Objects
Resolve Conflicts in Configuration of Signal Objects for Code Generation
Create Persistent Data Objects
Simulink.DualScaledParameter Property Dialog Box
Main Attributes Tab
Calibration Attributes Tab
Simulink.NumericType Property Dialog Box
Use Simulink.Signal Objects to Specify and Control Signal Attributes
Using Signal Objects to Assign or Validate Signal Attributes
Validation
Multiple Signal Objects
Signal Specification Block: An Alternative to Simulink.Signal
Bus Support
Define Data Classes
Use an example to define data classes
Manually define data class
Optional: Add properties to data class
Optional: Add initialization code to data class
Optional: Define storage classes
Optional: Define custom attributes for storage classes
Determine Where to Store Variables and Objects for Simulink Models
Types of Data
Types of Data Storage
Managing Data Storage for Your Project
Data Consistency in Model Hierarchy
Create, Edit, and Manage Workspace Variables
Tools for Managing Variables
Edit Variable Value or Property from Block Parameter
Modify Structure and Array Variables Interactively
Ramifications of Modifying or Deleting a Variable
Analyze Variable Usage in a Model
Rename a Variable Throughout a Model
Interact with Variables Programmatically
Edit and Manage Workspace Variables by Using Model Explorer
Finding Variables That Are Used by a Model or Block
Finding Blocks That Use a Specific Variable
Finding Unused Workspace Variables
Editing Workspace Variables
Rename Variables
Compare Duplicate Workspace Variables
Export Workspace Variables
Importing Workspace Variables
Model Workspaces
Model Workspace Differences from MATLAB Workspace
Troubleshooting Memory Issues
Manipulate Model Workspace Programmatically
Specify Source for Data in Model Workspace
Data source
MAT-File and MATLAB File Source Controls
MATLAB Code Source Controls
Change Model Workspace Data
Change Workspace Data Whose Source Is the Model File
Change Workspace Data Whose Source Is a MAT-File or MATLAB File
Changing Workspace Data Whose Source Is MATLAB Code
Use MATLAB Commands to Change Workspace Data
Create Model Mask
Create External File Adapter for Loading Variables into Simulink.SimulationInput Object
Write Class Definition for Custom File Adapter
Test Custom File Adapter
Register Custom File Adapter
Use Custom File Adapter to Load Variables for Simulation
Symbol Resolution
Symbols
Symbol Resolution Process
Numeric Values with Symbols
Other Values with Symbols
Limit Signal Resolution
Explicit and Implicit Symbol Resolution
Upgrade Level-1 Data Classes
Associating User Data with Blocks
Support Limitations for Simulink Software Features
Supported and Unsupported Simulink Blocks
Support Limitations for Stateflow Software Features
ml Namespace Operator, ml Function, ml Expressions
C or C++ Operators
C Math Functions
Atomic Subcharts That Call Exported Graphical Functions Outside a Subchart
Atomic Subchart Input and Output Mapping
Recursion and Cyclic Behavior
Custom C/C++ Code
Textual Functions with Literal String Arguments
Stateflow Charts Containing Ports
Custom State Attributes in Discrete FIR Filter block
Open Model Data Editor
Build the Model and Inspect the Generated Code
Enumerations and Modeling
Simulink Enumerations
Simulink Constructs that Support Enumerations
Simulink Enumeration Limitations
Use Enumerated Data in Simulink Models
Define Simulink Enumerations
Simulate with Enumerations
Specify Enumerations as Data Types
Get Information About Enumerated Data Types
Enumeration Value Display
Instantiate Enumerations
Enumerated Values in Computation
Create Data to Use as Simulation Input
Create and Edit Signal Data
Differences Between the Root Inport Mapper Signal Editor and Other Signal Editors
Table Editing Data Support
Add and Edit Multidimensional Signals
Draw a Ramp Using Snap to Grid for Accuracy
Save and Send Changes to the Root Inport Mapper Tool
Change Signal Editor Default Layout
Hide Toolstrip
Minimize Signal Editor Tools
Move Signal Editor Tools
Use Scenarios and Insert Signals in Signal Editor
Use Scenarios to Group and Organize Inputs
Link in Signal Data from Signal Builder Block and Simulink Design Verifier Environment
Insert Signals
Add Signals to Scenarios
Work with Basic Signal Data
Create Signals and Signal Data
Work with Basic Signal Data in Tabular Editor
Create Signals with MATLAB Expressions and Variables
Replace Signal Data with MATLAB Expressions
Create Freehand Signal Data Using Mouse or Multi-Touch Gestures
Import Custom File Type
Create Custom File Type for Import to Signal Editor
Define New FileType Object for Use in Simulink
Define FileType Object
Create sldvData Custom File Type Reader to Import to Signal Editor
Export Signals to Custom Registered File Types
Load Simulation Input Data
Provide Signal Data for Simulation
Identify Model Signal Data Requirements
Signal Data Storage for Loading
Load Input Signal Data
Log Output Signal Data
Load Big Data for Simulations
Stream Individual Signals Using SimulationDatastore Objects
Stream Entire Dataset Using DatasetRef Object
Load Individual Signals from a DatasetRef Object
Stream Data from a MAT-File as Input for a Parallel Simulation
Overview of Signal Loading Techniques
Source Blocks
Root-Level Input Ports
From File Block
From Spreadsheet Block
From Workspace Block
Signal Editor Block
Comparison of Signal Loading Techniques
Techniques
Impact of Loading Techniques on Block Diagrams
Comparison of Techniques
Control How Models Load Input Data
Configure Input Data Interpolation
Capture Dynamics of Input Data
Load Data as Continuous Signal
Load Data as Discrete Signal
Load Data Logged in Another Simulation
Load Logged Data
Configure Logging to Meet Loading Requirements
Load Data to Represent Variable-Step Input from Model Hierarchy
Load Input Data for Basic Test Cases
Load Data to Root-Level Input Ports
Specify Input Data
Forms of Input Data
Time Values for the Input Parameter
Data Loading
Loading Dataset Data to Root-Level Inputs
Loading MATLAB Timeseries Data to Root-Level Inputs
Loading MATLAB Timetable Data to Root-Level Inputs
Loading Data Structures to Root-Level Inputs
Loading Data Arrays to Root-Level Inputs
Loading MATLAB Time Expressions to Root Inports
Load Bus Data to Root-Level Input Ports
Imported Bus Data Requirements
Open Example Materials
Import Bus Data to a Top-Level Inport
Get Information About Bus Objects
Create Structures of Timeseries Objects from Buses
Import Array of Buses Data
Load Input Data for a Bus Using In Bus Element Blocks
Load Signal Data That Uses Units
Loading Bus Signals That Have Units
Load Data Using the From File Block
Load Data Using the From Workspace Block
Load Data Using Playback Block
Load Timetable Data Using Playback Block
Load Simulation Inputs Using the Root Inport Mapper
Map Data Using Root Inport Mapper Tool
The Model
Create Signal Data
Import and Visualize Workspace Signal Data
Map the Data to Inports
Save the Mapping and Data
Simulate the Model
Map Root Inport Signal Data
Command-Line Interface
Import and Mapping Workflow
View and Inspect Signal Data
Create Signal Data for Root Inport Mapping
Choose a Source for Data to Import and Map
Choose a Naming Convention for Signals and Buses
Choose a Base Workspace and MAT-File Format
Bus Signal Data for Root Inport Mapping
Create Signal Data in a MAT-File for Root Inport Mapping
Import Signal Data for Root Inport Mapping
Import Signal Data
Import Bus Data
Import Signal Data from Other Sources
Import Data from Signal Editor
Import Test Vectors from Simulink Design Verifier Environment
Map Signal Data to Root Input Ports
Select Map Mode
Set Options for Mapping
Select Data to Map
Map Data
Understand Mapping Results
Alternative Workflows to Load Mapping Data
Preview Signal Data
Generate MATLAB Scripts for Simulation with Scenarios
Create and Use Custom Map Modes
Create Custom Mapping File Function
Root Inport Mapping Scenarios
Open Scenarios
Save Scenarios
Open Existing Scenarios
Work with Multiple Scenarios
Load Data with Interchangeable Scenarios
Load Data with Interchangeable Scenarios Using Signal Editor Block
Explore the Signal Editor Block
Get Number of Scenarios and Signals
Migrate from Signal Builder Block to Signal Editor Block
Replace Signal Builder Block with Signal Editor Block
Replace Programmatic Use of signalbuilder
Importing and Exporting Simulation Data
Save Simulation Data
Choose Type of Simulation Data to Log
Choose Technique to Log Simulation Data
Log Data
View and Access Logged Simulation Data
View Logged Data Using Simulation Data Inspector
Access Logged Data Programmatically
Data Format for Logged Simulation Data
Data Format for Block-Based Logged Data
Data Format for Model-Based Logged Data
Signal Logging Format
Logged Data Store Format
Time, State, and Output Data Format
Convert Data to Dataset Format
Why Convert to Dataset Format?
Results of Conversion
Convert timeseries object to Dataset object
Convert Structure to Dataset Object
Migrate Legacy Code That Uses ModelDataLogs
Dataset Conversion Limitations
Limit the Size of Logged Data
Limit the Number of Runs Retained in the Simulation Data Inspector Archive
Specify a Minimum Disk Space Requirement or Maximum Size for Logged Data
View Data Only During Simulation
Reduce the Number of Data Points Logged from Simulation
Specify Signal Values to Log
Decimation
Log Last n Signal Values
Specify Logging Intervals
Work with Big Data for Simulations
Big Data Workflow
Log Data to Persistent Storage
When to Log to Persistent Storage
Log to Persistent Storage
Enable Logging to Persistent Storage Programmatically
How Simulation Data Is Stored
Save Logged Data from Successive Simulations
Analyze Big Data from a Simulation
Create DatasetRef Objects to Access Logged Datasets
Use SimulationDatastore Objects to Access Signal Data
Create Timetables for MATLAB Analysis
Create Tall Timetables
Access Persistent Storage Metadata
Access Error Information
Samples to Export for Variable-Step Solvers
Output Options
Refine Output
Produce Additional Output
Produce Specified Output Only
Save Signal Data Using Signal Logging
Open Model
Enable Signal Logging for Model
Mark Signals for Logging
Specify Signal Names
Simulate Model and View Data
Access Signal Logging Data Programmatically
View the Signal Logging Configuration
Approaches for Viewing the Signal Logging Configuration
View Signal Logging Configuration Using the Simulink Editor
View Logging Configuration Using the Signal Logging Selector
View Signal Logging Configuration Using the Model Explorer
Programmatically Find Signals Configured for Logging
Override Signal Logging Settings
Benefits of Overriding Signal Logging Settings
Two Interfaces for Overriding Signal Logging Settings
Scope of Signal Logging Setting Overrides
Override Signal Logging Settings with Signal Logging Selector
Override Signal Logging Settings from MATLAB
Visualize and Access Signal Logging Data
View Signal Logging Data Using Simulation Data Inspector
Access Workspace Data Programmatically
Access Logged Signals with Spaces and Newlines in Logged Names
Log Signals in For-Each Subsystems
Log Signal in Nested For-Each Subsystem
Log Bus Signals in For-Each Subsystem
Save Block States and Simulation Operating Points
Choose Which State Information to Log
Choose Format for Logged State Information
Save State Information
Log Data to the Workspace and a File Using the Record Block
Working with Data Stores
Data Store Basics
When to Use a Data Store
Local and Global Data Stores
Data Store Diagnostics
Specify Initial Value for Data Store
Model Global Data by Creating Data Stores
Data Store Examples
Create and Apply Data Stores
Data Stores with Data Store Memory Blocks
Data Stores with Signal Objects
Access Data Stores with Simulink Blocks
Order Data Store Access
Data Stores with Buses and Arrays of Buses
Accessing Specific Bus and Matrix Elements
Rename Data Stores
Customized Data Store Access Functions in Generated Code
Log Data Stores
Logging Local and Global Data Store Values
Supported Data Types, Dimensions, and Complexity for Logging Data Stores
Data Store Logging Limitations
Logging Data Stores Created with a Data Store Memory Block
Logging Icon for the Data Store Memory Block
Logging Data Stores Created with a Simulink.Signal Object
Accessing Data Store Logging Data
Simulink Data Dictionary
What Is a Data Dictionary?
Dictionary Capabilities
Sections of a Dictionary
Dictionary Usage for Models Created with Different Versions of Simulink
Manage and Edit Entries in a Dictionary
Dictionary Referencing
Import and Export File Formats
Allow Access to Base Workspace
Migrate Models to Use Simulink Data Dictionary
Migrate Single Model to Use Dictionary
Migrate Model Reference Hierarchy to Use Dictionary
Considerations Before Migrating to Data Dictionary
Continue to Use Shared Data in the Base Workspace
Migrate Complicated Model Hierarchy with Shared Data
Enumerations in Data Dictionary
Migrate Enumerated Types into Data Dictionary
Manipulate Enumerations in Data Dictionary
Remove Enumerated Types from Data Dictionary
Import and Export Dictionary Data
Import Data to Dictionary from File
Export Design Data from Dictionary
View and Revert Changes to Dictionary Data
View and Revert Changes to Dictionary Entries
View and Revert Changes to Entire Dictionary
Partition Dictionary Data Using Referenced Dictionaries
Partition Data for Model Reference Hierarchy Using Data Dictionaries
Open the Example Model and Load Design Data
Create a Dictionary for Each Component
Strategies to Discover Shared Data
Attach Data Dictionary to Custom Libraries
Author Library Blocks with Data Types Defined in Attached Data Dictionary
Use Blocks From a Library with Attached Data Dictionary
Considerations When Using a Library Dictionary
Store Data in Dictionary Programmatically
Add Entry to Design Data Section of Data Dictionary
Rename Data Dictionary Entry
Increment Value of Data Dictionary Entry
Data Dictionary Management
Dictionary Section Management
Dictionary Entry Manipulation
Transition to Using Data Dictionary
Programmatically Migrate Single Model to Use Dictionary
Import Directly From External File to Dictionary
Programmatically Partition Data Dictionary
Make Changes to Configuration Set Stored in Dictionary
Attach Data Dictionary to Subsystem Reference
Attach Data Dictionary to a Subsystem File
Symbol Resolution Process
Considerations and Limitations
Graphically Manage Shared Interfaces, Data Types, and Constants
Create Simulink Data Dictionary and Open Architectural Data Section for Editing
Design Data Types, Interfaces, and Constants Using Architectural Data Editor
Link Data Dictionary to Model
Managing Signals
Working with Signals
Signal Basics
Signal Line Styles
Signal Properties
Signal Names and Labels
Signal Display Options
Store Design Attributes of Signals and States
Test Signals
Signal Types
Control Signals
Composite Signals
Virtual and Nonvirtual Signals
Investigate Signal Values
Initialize Signal Values
View Signal Values
Display Signal Values in Model Diagrams
Signal Data Types
Complex Signals
Exporting Signal Data
Signal Label Propagation
Blocks That Support Signal Label Propagation
How Simulink Propagates Signal Labels
Display Propagated Signal Labels
Special Cases of Signal Propagation
Determine Signal Dimensions
Simulink Blocks that Support Multidimensional Signals
Determine the Output Dimensions of Source Blocks
Determine the Output Dimensions of Nonsource Blocks
Signal and Parameter Dimension Rules
Scalar Expansion of Inputs and Parameters
Get Compiled Port Dimensions
Highlight Signal Sources and Destinations
Highlight Signal Source
Highlight Signal Destination
Choose the Path of a Trace
Trace a Signal To and From Subsystems
Show All Possible Paths of a Trace
Display Port Values Along a Trace
Remove Highlighting
Resolve Incomplete Highlighting to Library Blocks
Signal Highlighting in Variant Systems
Limitations
Bus Element Tracing and Highlighting
Specify Signal Ranges
Blocks That Allow Signal Range Specification
Work with Signal Ranges in Blocks
Troubleshoot Signal Range Errors
Unexpected Errors or Warnings for Data with Greater Precision or Range than double
Initialize Signals and Discrete States
Using Block Parameters to Initialize Signals and Discrete States
Use Signal Objects to Initialize Signals and Discrete States
Using Signal Objects to Tune Initial Values
Initialization Behavior Summary for Signal Objects
Configure Signals as Test Points
What Is a Test Point?
Displaying Test Point Indicators
Specify Common Set of Signal Properties as Value Type
Determine Whether To Use Value Types
Create Value Types
Specify Value Types
Save Value Types
Map Value Types to Models
Value Types at Interfaces
Display Signal Attributes
Ports & Signals Menu
Port Data Types
Design Ranges
Signal Dimensions
Signal to Object Resolution Indicator
Wide Nonscalar Lines
Signal Groups
About Signal Groups
Using the Signal Builder Block with Fast Restart
Editing Signal Groups
Editing Signals
Creating Signal Group Sets Manually
Signal Data Files and Data Reformatting Function for Following Procedures
Importing Signal Group Sets
Importing Data with Custom Formats
Editing Waveforms
Signal Builder Time Range
Exporting Signal Group Data
Simulating with Signal Groups
Simulation from Signal Builder Block
Using Composite Interfaces
Composite Interface Guidelines
Visualize Composite Interfaces
Define Composite Interfaces
Explore Composite Interfaces
Composite Interfaces
High-Level Composite Interface Selection Guidelines
Modeling Requirement Considerations
Compare Capabilities of Composite Interfaces
Composite Interface Elements
Composite Interface Modeling
Composite Interface Code Generation
Group Signals or Messages into Virtual Buses
Group Signal Lines Within Component
Connect Multiple Output Signals to a Port
Specify Multiple Elements at Input Port
Access Elements of Buses
Simplify Subsystem and Model Interfaces with Bus Element Ports
Combine Multiple Subsystem Ports into One Port
Simplify Bus Interfaces in Subsystems and Models
Modify Bus Hierarchy
Resolve Circular Dependencies in Buses
Create Nonvirtual Buses
Create Nonvirtual Buses Within Component
Create Nonvirtual Buses at Interfaces
Convert Virtual Bus to Nonvirtual Bus
Create Nonvirtual Bus from MATLAB Structure
Display Bus Information
Display Bus Line Styles
View Bus Hierarchy
Trace Bus Element to Source and Destination Blocks
Find Buses at Block Diagram Interfaces
Display Bus Element Values
View Simulation Data for Buses
Get Bus Hierarchy and Virtuality Programmatically
Get Bus Attributes at Interfaces Programmatically
Bus-Capable Blocks
Assign Signal Values to Bus Elements
Identify Automatic Bus Conversions
Bus-to-Vector Conversions
Virtual and Nonvirtual Bus Conversions
Modify Sample Times for Nonvirtual Buses
Specify Bus Properties with Bus Objects
Determine Whether to Use Bus Objects
Create Simulink Bus Objects
Specify Simulink Bus Objects
Save Simulink Bus Objects
Map Simulink Bus Objects to Models
Programmatically Create Simulink Bus Objects
Create Bus Objects from Bus Element Objects
Create Bus Objects from Blocks
Create Bus Objects from MATLAB Data
Create Bus Objects from External C Code
Specify Initial Conditions for Bus Elements
Blocks That Support Bus Initialization
Set Diagnostics to Support Bus Initialization
Create Initial Condition Structures
Control Data Types of Structure Fields
Create Full Structures for Initialization
Create Partial Structures for Initialization
Initialize Buses Using Block Parameters
Group Nonvirtual Buses in Arrays of Buses
Requirements of Arrays of Buses
Create Array of Buses from Nonvirtual Buses
Create Array of Buses from MATLAB Structures
Work with Arrays of Buses
Perform Iterative Processing
Assign Values into Arrays of Buses
Select Bus Elements from Array of Buses
Import Array of Buses Data
Log Arrays of Buses
Initialize Arrays of Buses
Code Generation
Programmatically Initialize Arrays of Buses
Assign into Elements of Array of Buses
Iteratively Process Nonvirtual Buses with Arrays of Buses
Share and Reuse Bus-Routing Blocks
Generate Code for Nonvirtual Buses
Control Data Types of Initial Condition Structure Fields
Code Generation for Arrays of Buses
Inspect Generated Code for Nonvirtual Buses
Trace Connections Using Interface Display
Trace Connections in a Subsystem
Working with Variable-Size Signals
Variable-Size Signal Basics
How Variable-Size Signals Propagate
Determine Whether Signal Line Has Variable Size
Empty Signals
Simulink Block Support for Variable-Size Signals
Variable-Size Signal Limitations
Unbounded Variable-Size Signals
Using Unbounded Variable-Size Signals
Unbounded Variable-Size Signals in C++ Code Generation
Unbounded Variable-Size Arrays in MATLAB Function Block
Supported Blocks and Features for Simulation
Limitations
Inspect Variable-Size Signals on Simulink Models
Variable-Size Signal Generation and Operations
Variable-Size Signal Length Adaptation
Mode-Dependent Variable-Size Signals
S-Functions Using Variable-Size Signals
Customizing Simulink Environment and Printed Models
Customizing the Simulink User Interface
Access Frequently Used Features and Commands in Simulink
Search for Simulink Toolstrip Actions
Rerun Favorite Commands for Simulink
Share Favorite Commands for Simulink
Create Custom Simulink Toolstrip Tabs
Start Simulink
Create Simulink Toolstrip Component
Add Blank Tab to Simulink Toolstrip
Open JSON File to Develop Custom Tab
Define Custom Tab Layout
Choose Among Types of Controls
Get Built-In Simulink Actions
Specify Built-In Simulink Actions
Define Custom Actions
Choose Among Pop-Up List Elements
Define Pop-Up Lists
Share Custom Tabs
Add Prepopulated Custom Tab to Simulink Toolstrip
Add Items to Model Editor Menus
Code for Adding Menu Items
Define Menu Items
Register Menu Customizations
Callback Info Object
Debugging Custom Menu Callbacks
Menu Tags
Disable Simulink Toolstrip and Context Menu Actions
Get Built-In Simulink Actions
Set Up Customization File
Create Filter Functions
Register Filter Functions
Read and Refresh Customization Files
Disable and Hide Dialog Box Controls
About Disabling and Hiding Controls
Disable a Button on a Dialog Box
Write Control Customization Callback Functions
Dialog Box Methods
Widget IDs
Register Control Customization Callback Functions
Customize Library Browser Appearance
Reorder Libraries
Disable and Hide Libraries
Expand or Collapse Library in Browser Tree
Improve Quick Block Insert Results
Register Customizations with Simulink
Set Up Customization File
Edit the Customization File
Read and Refresh Customization Files
Frames for Printed Models
Create Print Frames for Printed Pages
PrintFrame Editor
Create a Print Frame
Add Rows and Cells to Print Frames
Add Content to Print Frame Cells
Format Content in Cells
Running Models on Target Hardware
About Run on Target Hardware Feature
Simulink Supported Hardware
Block Produces Zeros or Does Nothing in Simulation
Running Simulations in Fast Restart
How Fast Restart Improves Iterative Simulations
Limitations
Get Started with Fast Restart
Prepare a Model to Use Fast Restart
Fast Restart Methodology
Model Component Testing
Component Verification
Component Verification
Use Foundational Blocks
Perform Rigorous Component Verification
Run Polyspace Analysis on Generated Code by Using Packaged Options Files
Generate and Package Polyspace Options Files
Run Polyspace Analysis by Using the Packaged Options Files
Analyze Code Generated as Standalone Code in a Distributed Workflow
Open Model for Distributed Analysis
Configure Model
Generate Code Archive
Generate and Package Polyspace Options File
Run Polyspace Analysis by Using the Packaged Options Files
Manage a Variant Model Using Variant Manager
Variant Configurations
What is a Variant Configuration?
Types of Variant Configurations
Constraints on Variant Configurations
Variant Configuration Data Object
Activate a Variant Configuration
Differences Between Variant Manager Activation and Update Diagram Process
Referenced Component Configurations
Preferred Configuration
Variant Manager View of Variant Configurations
Limitations
Create and Activate Variant Configurations
Steps to Create Variant Configurations
Open Variant Manager
Configurations Tab in Variant Manager
Add New Variant Configuration
Add, Import, or Export Control Variables in Variant Configuration
Edit Control Variables in Variant Configuration
Set Up Variant Configurations for Referenced Components
Define Constraints for Variant Configurations
Save Variant Configurations
Validate and Activate Variant Configuration
Apply Variant Configuration on Model
Save and Reuse Variant Configurations Using Variant Configuration Data Object
Generate Variant Configurations Automatically
Generate Variant Configurations Using Variant Manager
Steps to Generate Configurations
Limitations
Reduce Variant Models Using Variant Reducer
Variant Reducer
Steps to Reduce Variant Model
Explore Variant Reducer Summary
Considerations and Limitations for Variant Reduction
Analyze Variant Configurations in Models Containing Variant Blocks
Analyze Variant Configurations Using Variant Analyzer
Run Variant Analyzer
Explore Variant Analysis Report
Analyze Variant Configurations Programmatically
Limitations
Reduce Model Containing Variant Blocks
Variant Manager Workflow to Set Up Variant Configurations for Models
Variant Manager Workflow to Manage Existing Variant Configurations in Models
Compatibility Considerations When Using Variant Manager for Simulink Support Package
Changes to the Simulink.VariantConfigurationData class
Changes to the Simulink.VariantManager class
Variant Reducer and Variant Analyzer
Reduce Model Containing Variant Parameters
Compose Variant Configurations for Top Model Using Referenced Model Configurations
Open Component Configurations View
Select Variant Configuration for Referenced Component
Clear Selected Variant Configuration
Component Configurations View Example
Validate That Top-Level Model Uses Referenced Component Configuration
Validate and Activate Variant Configurations
Analyze Variant Configurations Programmatically
Generate Variant Configurations Programmatically
Find Variant Control Variables for Model
Reduce Models Containing Referenced Subsystems
Integrate Python Code With Simulink
Overview of Integrating Python Code with Simulink
Configure System to Use Python
Integrate Python Code with Simulink Using MATLAB Function Block
Integrate Python Code with Simulink Using MATLAB System Block
Import Python Code to Simulink Using Python Importer Wizard
Configure System to Use Python
Use Python Importer with Blockset Designer
Use Python Importer as a Standalone Application
Vary Block Parameter Values Conditionally Using Variant Parameters
Use Variant Parameters to Reuse Block Parameters with Different Values
When to Create Variant Parameters
Advantages of Using Variant Parameters
Limitations of Using Variant Parameters
Create a Simple Variant Parameter Model
Variant Control Mode in Variant Parameters
Switch Between Choices Using Condition Expressions in Variant Parameters
Variant Activation Times for Different Variant Control Modes in Variant Parameters
Use Variant Control Variables in Variant Parameters
Numeric Variant Control Values for Rapid Prototyping of Variant Parameters
Simulink.Parameter Type of Variant Control Variables for Code Generation of Variant Parameters
Enumerated Types to Improve Code Readability of Variant Control Variables of Variant Parameters
Simulink.Variant Objects for Variant Condition Reuse of Variant Parameters
Change Active Values and Activation Time of Variant Parameters
Improve Code Readability of Variant Parameters Using Enumerated Types
Compile Code Conditionally for All Values of Variant Parameters with Same and Different Dimensions
Run Executable for Different Variant Parameter Values Without Recompiling Code
Reuse Variant Parameter Values from Handwritten Code Using Simulink.Parameter Variables
Group Variant Parameter Values in Code Using Variant Parameter Bank


๐Ÿ“œ SIMILAR VOLUMES