Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Functions

Alphabetical List By Category

Modeling

Block Libraries

HDL Coder

HDL Operations
hdllib Display blocks that are compatible with HDL code generation

Model Editing Fundamentals

simulink Open Simulink Start Page
start_simulink Start Simulink without opening any windows
slLibraryBrowser Open Simulink Library Browser
new_system Create Simulink model or library in memory
open_system Open Simulink model, library, subsystem, or block dialog box
load_system Invisibly load Simulink model
Simulink.createFromTemplate Create model or project from template
Simulink.findTemplates Find model or project templates with specified properties
Simulink.defaultModelTemplate Set or get default model template
add_block Add block to model
add_line Add line to Simulink model
replace_block Replace blocks in Simulink model
delete_block Delete blocks from Simulink system
delete_line Delete line from Simulink system
bdroot Return name of top-level Simulink system
find_system Find systems, blocks, lines, ports, and annotations
gcs Get pathname of current system
getfullname Get pathname of block or line
gcb Get path name of current block
gcbh Get handle of current block
getSimulinkBlockHandle Get block handle from block path
set_param Set system and block parameter values
get_param Get parameter names and values
add_param Add parameter to Simulink system
delete_param Delete system parameter added via add_param command
Simulink.BlockDiagram.createSubsystem Create subsystem containing specified set of blocks
Simulink.BlockDiagram.deleteContents Delete contents of block diagram
Simulink.BlockDiagram.expandSubsystem Expand subsystem contents to containing model level
Simulink.SubSystem.copyContentsToBlockDiagram Copy contents of subsystem to empty block diagram
Simulink.SubSystem.deleteContents Delete contents of subsystem
save_system Save Simulink system
close_system Close Simulink system window or block dialog box
Simulink.exportToTemplate Create template from model or project
Simulink.exportToVersion Export model or library for use in previous version of Simulink
bdclose Close any or all Simulink system windows unconditionally
bdIsLoaded Whether block diagram is in memory
bdIsLibrary Whether block diagram is a library
bdIsDirty Whether block diagram has unsaved changes
slCharacterEncoding Change MATLAB character set encoding
slIsFileChangedOnDisk Determine whether model has changed since it was loaded
print Print figure or save to specific file format
orient Paper orientation for printing or saving
frameedit Edit print frames for Simulink and Stateflow block diagrams

Design Models

Model Hierarchy

Simulink.BlockDiagram.createSubsystem Create subsystem containing specified set of blocks
Simulink.BlockDiagram.copyContentsToSubsystem Copy contents of block diagram to empty subsystem
Simulink.SubSystem.convertToModelReference Convert subsystem to model reference
Simulink.SubSystem.copyContentsToBlockDiagram Copy contents of subsystem to empty block diagram
Simulink.SubSystem.deleteContents Delete contents of subsystem
Simulink.BlockDiagram.expandSubsystem Expand subsystem contents to containing model level
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem

Nonlinearity

Simulink.LookupTable Store and share lookup table and breakpoint data, configure the data for ASAP2 and AUTOSAR code generation
Simulink.Breakpoint Store and share data for a breakpoint set, configure the data for ASAP2 and AUTOSAR code generation
Simulink.lookuptable.Table Configure table data for lookup table object
Simulink.lookuptable.Breakpoint Configure breakpoint set data for lookup table object
Simulink.lookuptable.StructTypeInfo Configure settings for structure type that lookup table object uses in the generated code

Multicore Processor Targets

Simulink.architecture.config Create or convert configuration for concurrent execution
Simulink.architecture.add Add tasks or triggers to selected architecture of model
Simulink.architecture.delete Delete triggers and tasks from selected architecture of model
Simulink.architecture.find_system Find objects under architecture object
Simulink.architecture.get_param Get configuration parameters of architecture objects
Simulink.architecture.importAndSelect Import and select target architecture for concurrent execution environment for model
Simulink.architecture.profile Generate profile report for model configured for concurrent execution
Simulink.architecture.register Add custom target architecture to concurrent execution target architecture selector
Simulink.architecture.set_param Set architecture object properties
Simulink.GlobalDataTransfer Configure concurrent execution data transfers

Configure Models

Blocks

set_param Set system and block parameter values
get_param Get parameter names and values
Simulink.DualScaledParameter Specify name, value, units, and other properties of Simulink dual-scaled parameter
Simulink.Parameter Store, share, and configure block parameter values

Signals

disableimplicitsignalresolution Convert model to use only explicit signal resolution
signalbuilder Create and access Signal Builder blocks
Simulink.Signal Specify attributes of signal

Variables

getVariable Get value of variable from workspace
hasVariable Determine if variable exists in workspace
Simulink.findVars Analyze relationship between variables and blocks in models
matlab.io.saveVariablesToScript Save workspace variables to MATLAB script
Simulink.data.evalinGlobal Evaluate MATLAB expression in context of Simulink model
Simulink.data.assigninGlobal Modify variable values in context of Simulink model
Simulink.data.existsInGlobal Check existence of variable in context of Simulink model
Simulink.data.dictionary.create Create new data dictionary and create Simulink.data.Dictionary object
Simulink.data.dictionary.open Open data dictionary for editing
Simulink.data.dictionary.cleanupWorkerCache Restore defaults after parallel simulation with data dictionary
Simulink.data.dictionary.setupWorkerCache Enable parallel simulation with data dictionary
Simulink.data.dictionary.getOpenDictionaryPaths Return file names and paths of open data dictionaries
Simulink.data.dictionary.closeAll Close all connections to all open data dictionaries
Simulink.ModelWorkspace Describe model workspace
Simulink.WorkspaceVar Contains information about workspace variables and blocks that use them
Simulink.VariableUsage Store information about the relationship between variables and blocks in models
Simulink.CoderInfo Specify information needed to generate code for signal or parameter data
Simulink.data.Dictionary Configure data dictionary
Simulink.data.dictionary.Section Configure data dictionary section
Simulink.data.dictionary.Entry Configure data dictionary entry
Simulink.data.dictionary.EnumTypeDefinition Store enumerated type definition in data dictionary

Sample Time

Simulink.BlockDiagram.getSampleTimes Return all sample times associated with model
Simulink.Block.getSampleTimes Return sample time information for a block
Simulink.SampleTime Object containing sample time information
Simulink.BlockPortData Describe block input or output port

Data Types

enumeration Display class enumeration members and names
Simulink.defineIntEnumType Define enumerated data type
Simulink.data.getEnumTypeInfo Get information about enumerated data type
fixdt Create Simulink.NumericType object describing fixed-point or floating-point data type
fixpt_evenspace_cleanup Modify breakpoints of lookup table to have even spacing
fixpt_interp1 Implement 1-D lookup table
fixpt_look1_func_approx Optimize fixed-point approximation of nonlinear function by interpolating lookup table data points
fixpt_look1_func_plot Plot fixed-point approximation function for lookup table
fixpt_set_all Set property for each fixed-point block in subsystem
fixptbestexp Exponent that gives best precision for fixed-point representation of value
fixptbestprec Determine maximum precision available for fixed-point representation of value
float Create Simulink.NumericType object describing floating-point data type
fxptdlg Start Fixed-Point Tool
num2fixpt Convert number to nearest value representable by specified fixed-point data type
sfix Create Simulink.NumericType object describing signed fixed-point data type
sfrac Create Simulink.NumericType object describing signed fractional data type
sint Create Simulink.NumericType object describing signed integer data type
Simulink.importExternalCTypes Generate Simulink representations of custom data types defined by C or C++ code
tunablevars2parameterobjects Create Simulink parameter objects from tunable parameters
ufix Create Simulink.NumericType object describing unsigned fixed-point data type
ufrac Create Simulink.NumericType object describing unsigned fractional data type
uint Create Simulink.NumericType object describing unsigned integer data type
Simulink.AliasType Create alias for signal and parameter data type
Simulink.NumericType Specify floating point, integer, or fixed point data type

Model, Block, and Port Callbacks

set_param Set system and block parameter values
get_param Get parameter names and values
getCallbackAnnotation Get information about annotation
Simulink.Annotation Specify properties of model annotation

Annotate Models

add_block Add block to model
docblock Get or set editor invoked by Simulink DocBlock
hilite_system Highlight block, signal line, port, or annotation
getCallbackAnnotation Get information about annotation
Simulink.Annotation Specify properties of model annotation

Transform Models

Discretization

slmdldiscui Open Model Discretizer GUI
sldiscmdl Discretize model that contains continuous blocks

Trimming and Linearization

trim Find trim point of dynamic system
dlinmod Extract discrete-time linear state-space model around operating point
linmod Extract continuous-time linear state-space model around operating point
linmod2 Extract continuous-time linear state-space model around operating point
linmodv5 Extract continuous-time linear state-space model around operating point
Simulink.BlockDiagram.getInitialState Return initial state data of block diagram

Fixed Point

fxptdlg Start Fixed-Point Tool
fixdt Create Simulink.NumericType object describing fixed-point or floating-point data type
fixpt_look1_func_approx Optimize fixed-point approximation of nonlinear function by interpolating lookup table data points
fixpt_evenspace_cleanup Modify breakpoints of lookup table to have even spacing
fixpt_interp1 Implement 1-D lookup table
fixpt_look1_func_plot Plot fixed-point approximation function for lookup table
fixpt_set_all Set property for each fixed-point block in subsystem
fixptbestexp Exponent that gives best precision for fixed-point representation of value
fixptbestprec Determine maximum precision available for fixed-point representation of value
float Create Simulink.NumericType object describing floating-point data type
num2fixpt Convert number to nearest value representable by specified fixed-point data type
sfix Create Simulink.NumericType object describing signed fixed-point data type

Run Model Checks

modeladvisor Open Model Advisor
Simulink.ModelAdvisor Run Model Advisor from MATLAB file
ModelAdvisor.Preferences Set Model Advisor window preferences by specifying which folders and tabs to display

Diagnostics

sldiagnostics Display diagnostic information about Simulink system
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.SuppressedDiagnostic Suppress diagnostic warnings from a specified block

Simulation

Prepare Model Inputs and Outputs

Create Signal Data to Load

getRootInportMap Create custom object to map signals to root-level inports
getSlRootInportMap Create custom object to map signals to root-level inports using Simulink mapping mode
signalbuilder Create and access Signal Builder blocks
Simulink.BlockDiagram.getInitialState Return initial state data of block diagram
Simulink.Bus.createMATLABStruct Create MATLAB structures using same hierarchy and attributes as bus signals
Simulink.SimulationData.createStructOfTimeseries Create a structure with MATLAB timeseries object leaf nodes
createInputDataset Generate dataset object for root-level Inport blocks in model

Load Signal Data for Simulation

getRootInportMap Create custom object to map signals to root-level inports
convertToSlDataset Convert contents of MAT-file to Simulink.SimulationData.Dataset object
getSlRootInportMap Create custom object to map signals to root-level inports using Simulink mapping mode
signalbuilder Create and access Signal Builder blocks
getInputString Create comma-separated list of variables to map
Simulink.BlockDiagram.getInitialState Return initial state data of block diagram
Simulink.Bus.createMATLABStruct Create MATLAB structures using same hierarchy and attributes as bus signals
Simulink.SimulationData.createStructOfTimeseries Create a structure with MATLAB timeseries object leaf nodes

Save Runtime Data from Simulation

Simulink.ModelDataLogs.convertToDataset Convert logging data from Simulink.ModelDataLogs format to Simulink.SimulationData.Dataset format
Simulink.SimulationData.signalLoggingSelector Open Signal Logging Selector
Simulink.SimulationData.updateDatasetFormatLogging Convert model and its referenced models to use Dataset format for signal logging
unpack Extract signal logging objects from signal logs and write them into MATLAB workspace
Simulink.SimulationData.createStructOfTimeseries Create a structure with MATLAB timeseries object leaf nodes
Simulink.SimulationData.forEachTimeseries Call function on each timeseries object
Simulink.SimulationData.Unit.setName Specify name of logging data units
Simulink.SimulationData.DatasetRef.getDatasetVariableNames List names of Dataset variables in MAT-file
Simulink.SimulationData.DatasetRef.getAsDatastore Get matlab.io.datastore.SimulationDatastore representation of element from referenced Dataset object
who List names of top-level data logging objects in Simulink ModelDataLogs data log
whos List names and types of top-level data logging objects in Simulink ModelDataLogs data log
Simulink.SimulationData.Dataset Create Simulink.SimulationData.Dataset object
Simulink.SimulationData.DatasetRef Create Simulink.SimulationData.DatasetRef object
matlab.io.datastore.SimulationDatastore Datastore for inputs and outputs of Simulink models
Simulink.SimulationData.BlockPath Fully specified Simulink block path
Simulink.SimulationData.Signal Container for signal logging information
Simulink.SimulationData.State State logging element
Simulink.SimulationData.Unit Store units for simulation data
Simulink.SimulationOutput Access object values of simulation results
Simulink.SimulationData.LoggingInfo Signal logging override settings
Simulink.SimulationData.ModelLoggingInfo Signal logging override settings for a model
Simulink.SimulationData.SignalLoggingInfo Signal logging override settings for signal
Simulink.SimulationMetadata Access metadata of simulation runs

Configure Simulation Conditions

openDialog Open configuration parameters dialog
closeDialog Close configuration parameters dialog

Run Simulations

Run Individual Simulations Programmatically

sim Simulate dynamic system
model Execute particular phase of simulation of model
find Access and display values of simulation results
get Access and display values of simulation results
who List names of top-level data logging objects in Simulink ModelDataLogs data log
set_param Set system and block parameter values
get_param Get parameter names and values
getInitialState Return initial state data of block diagram
setBlockSimState Set SimState of individual Stateflow Chart, MATLAB Function, or S-function block
getBlockSimState Access SimState of individual Stateflow Chart, MATLAB Function, or S-function block
add_exec_event_listener Register listener for block method execution event
Simulink.SimState.ModelSimState Access SimState snapshot data
eventData Provide information about block method execution events

Run Multiple Simulations

parsim Simulate dynamic system in parallel or serial
in.setBlockParameter Set block parameters to be used for a specific simulation through SimulationInput object, in
in.setModelParameter Set model parameters to be used for a specific simulation through SimulationInput object, in
in.setVariable Set variables for a simulation through SimulationInput object, in
in.ExternalInput Set external inputs for a simulation through SimulationInput object, in
in.InitialState Set initial state to be used for a specific simulation through SimulationInput object, in
in.applyToModel Apply changes to the model specified through a SimulationInput object, in
in.PreSimFcn Specify a MATLAB function to run before start of each simulation through SimulationInput object, in
in.PostSimFcn Specify a MATLAB function to run after each simulation is complete through SimulationInput object, in
in.validate Validate the contents of the SimulationInput object, in
Simulink.SimulationInput Creates SimulationInput objects to make changes to a model for multiple or individual simulations

View and Analyze Simulation Results

Inspect and Analyze Simulation Results

find Access and display values of simulation results
get Access and display values of simulation results
who List names of top-level data logging objects in Simulink ModelDataLogs data log
Simulink.sdi.view Open the Simulation Data Inspector
Simulink.sdi.close Close the Simulation Data Inspector
Simulink.sdi.setSubPlotLayout Set layout of subplots
Simulink.sdi.clearPreferences Clear preference changes in the Simulation Data Inspector
Simulink.sdi.compareRuns Compare data between two simulation runs
Simulink.sdi.compareSignals Compare data from two signals
Simulink.sdi.getRun Get a Simulink.sdi.Run object containing simulation output data
Simulink.sdi.copyRun Create a copy of a run
Simulink.sdi.deleteRun Delete a run from the Simulation Data Inspector
Simulink.sdi.createRun Create a run in the Simulation Data Inspector
Simulink.sdi.getRunNamingRule Get the run naming rule for Simulation Data Inspector runs
Simulink.sdi.setRunNamingRule Specify a run naming rule
Simulink.sdi.resetRunNamingRule Reset the Simulation Data Inspector run naming rule to the default
Simulink.sdi.setRunOverwrite Enable overwrite run mode for a Simulation Data Inspector run
Simulink.sdi.getRunCount Get the number of runs in the Simulation Data Inspector
Simulink.sdi.getRunIDByIndex Get the run ID corresponding to the specified run index
Simulink.sdi.getAllRunIDs Get all run identifiers within the Simulation Data Inspector
Simulink.sdi.isValidRunID Determine if run ID is valid
Simulink.sdi.setTableGrouping Change grouping hierarchy of signals in Inspect pane
Simulink.sdi.copyRunViewSettings Copy signal line style and color specifications from one run to another run
Simulink.sdi.createRunOrAddToStreamedRun Create a single run for all simulation outputs
Simulink.sdi.getSignal Get a Simulink.sdi.Signal object for the specified signal in the Simulation Data Inspector
Simulink.sdi.deleteSignal Delete a signal from the Simulation Data Inspector
Simulink.sdi.addToRun Add data to existing run
Simulink.sdi.markSignalForStreaming Turn streaming on or off for a signal
Simulink.sdi.save Save current Simulation Data Inspector session
Simulink.sdi.load Load a saved Simulation Data Inspector session or view
Simulink.sdi.clear Clear all data from the Simulation Data Inspector
Simulink.sdi.exportRun Create a Simulink.SimulationData.Dataset object of the data in the specified run
Simulink.sdi.report Generate a Simulation Data Inspector report
Simulink.sdi.importDataFromWorkers Import data from Parallel Computing Toolbox workers
Simulink.sdi.DiffRunResult Results from comparing two simulation runs
Simulink.sdi.DiffSignalResult Results from comparing two signals
Simulink.sdi.Run Manages signal data and metadata of simulation run
Simulink.sdi.Signal Manages signal time series data and metadata
Simulink.SimulationData.Dataset Create Simulink.SimulationData.Dataset object
Simulink.HMI.InstrumentedSignals Access streamed signals in model
Simulink.HMI.SignalSpecification Information required to stream a single signal

Control Simulations with Interactive Displays

Simulink.HMI.InstrumentedSignals Access streamed signals in model
Simulink.HMI.SignalSpecification Information required to stream a single signal

Test and Debug Simulations

Simulink Debugger

sldebug Start simulation in debug mode

Diagnostics

sldiagnostics Display diagnostic information about Simulink system
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.BlockDiagram.getChecksum Return checksum of model
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem
Simulink.getSuppressedDiagnostics Return Simulink.SuppressedDiagnostic objects associated with a block, subsystem, or model
Simulink.suppressDiagnostic Suppress a diagnostic warning from a specific block
Simulink.restoreDiagnostic Restore diagnostic warnings to a specific block, subsystem, or model
modeladvisor Open Model Advisor
sldebug Start simulation in debug mode
addterms Add terminators to unconnected ports in model
Simulink.SuppressedDiagnostic Suppress diagnostic warnings from a specified block

Performance

Automated Performance Optimization

performanceadvisor Open Performance Advisor

Acceleration

sim Simulate dynamic system
set_param Set system and block parameter values
Simulink.BlockDiagram.buildRapidAcceleratorTarget Build Rapid Accelerator target for model and return run-time parameter set
Simulink.BlockDiagram.getChecksum Return checksum of model
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem
slbuild Build standalone executable or model reference target for model; except where noted, this function requires a Simulink Coder license

Manual Performance Optimization

slprofreport Regenerate profiler report from data, ProfileData, saved from previous run
sldiagnostics Display diagnostic information about Simulink system

Component-Based Modeling

Model Architecture

Subsystems

Simulink.BlockDiagram.createSubsystem Create subsystem containing specified set of blocks
Simulink.BlockDiagram.copyContentsToSubsystem Copy contents of block diagram to empty subsystem
Simulink.BlockDiagram.expandSubsystem Expand subsystem contents to containing model level
Simulink.SubSystem.convertToModelReference Convert subsystem to model reference
Simulink.SubSystem.copyContentsToBlockDiagram Copy contents of subsystem to empty block diagram
Simulink.SubSystem.deleteContents Delete contents of subsystem

Libraries

libinfo Get information about library blocks referenced by model
gcb Get path name of current block
gcbh Get handle of current block
LibraryBrowser.LibraryBrowser2 Simulink Library Browser

Model Referencing

find_mdlrefs Find Model blocks and referenced models at all levels or at top level only
view_mdlrefs Display graph of model reference dependencies
Simulink.SubSystem.convertToModelReference Convert subsystem to model reference
slbuild Build standalone executable or model reference target for model; except where noted, this function requires a Simulink Coder license

Data Stores

Simulink.SimulationData.DataStoreMemory Container for data store logging information
Simulink.SimulationData.BlockPath Fully specified Simulink block path
Simulink.SimulationData.Dataset Create Simulink.SimulationData.Dataset object

Composite Signals

Simulink.BlockDiagram.addBusToVector Convert virtual bus signals into vector signals by adding Bus to Vector blocks
Simulink.Bus.cellToObject Convert cell array containing bus information to bus objects
Simulink.Bus.createMATLABStruct Create MATLAB structures using same hierarchy and attributes as bus signals
Simulink.Bus.createObject Create bus objects from blocks or MATLAB structures
Simulink.Bus.objectToCell Use bus objects to create cell array containing bus information
Simulink.Bus.save Save bus objects in MATLAB file
slreplace_mux In legacy models, replace with Bus Creator blocks Mux blocks used to create buses
Simulink.Bus Specify properties of bus signal
Simulink.BusElement Describe element of bus signal

Configuration Reuse

attachConfigSet Associate configuration set or configuration reference with model
attachConfigSetCopy Copy configuration set or configuration reference and associate it with model
detachConfigSet Dissociate configuration set or configuration reference from model
getActiveConfigSet Get model's active configuration set or configuration reference
getConfigSet Get one of model's configuration sets or configuration references
getConfigSets Get names of all of model's configuration sets or configuration references
setActiveConfigSet Specify model's active configuration set or configuration reference
Simulink.BlockDiagram.loadActiveConfigSet Load, associate, and activate configuration set with model
Simulink.BlockDiagram.propagateConfigSet Propagate top model configuration reference to referenced models
Simulink.BlockDiagram.restoreConfigSet Restore model configuration for converted models
Simulink.BlockDiagram.saveActiveConfigSet Save active configuration set of model
set_param Set system and block parameter values
get_param Get parameter names and values
Simulink.ConfigSet Access model configuration set
Simulink.ConfigSetRef Link model to configuration set stored independently of any model

Variant Systems

Simulink.Variant Specify conditions that control variant selection
Simulink.VariantConfigurationData Class representing a variant configurations data object

Project Management

Simulink Project Setup

simulinkproject Open Simulink Project and get project object
slproject.create Create blank Simulink project
Simulink.createFromTemplate Create model or project from template
Simulink.findTemplates Find model or project templates with specified properties
Simulink.exportToTemplate Create template from model or project
slproject.getCurrentProjects List all top-level Simulink projects
slproject.loadProject Load Simulink project
export Export Simulink Project to zip
close Close Simulink Project
addFile Add file to Simulink Project
addPath Add folder to path of Simulink project
addReference Add referenced project to Simulink project
addShortcut Add shortcut to Simulink project
addFolderIncludingChildFiles Add folder and child files to Simulink Project
findFile Get Simulink Project file by name
isLoaded Determine if Simulink Project is loaded
reload Reload Simulink Project
removeFile Remove file from Simulink Project
removePath Remove folder from Simulink project path
removeReference Add folder to Simulink project path
removeShortcut Remove shortcut from Simulink project

Simulink Project File Management

simulinkproject Open Simulink Project and get project object
slproject.loadProject Load Simulink project
slproject.getCurrentProjects List all top-level Simulink projects
addFile Add file to Simulink Project
addFolderIncludingChildFiles Add folder and child files to Simulink Project
addLabel Attach label to Simulink Project file
addPath Add folder to path of Simulink project
addReference Add referenced project to Simulink project
addShortcut Add shortcut to Simulink project
close Close Simulink Project
createCategory Create category of Simulink Project labels
createLabel Define Simulink Project label
export Export Simulink Project to zip
findCategory Get Simulink Project category of labels
findFile Get Simulink Project file by name
findLabel Get Simulink Project file label
isLoaded Determine if Simulink Project is loaded
reload Reload Simulink Project
removeCategory Remove Simulink Project category of labels
removeLabel Remove label from Simulink Project

Dependency Analysis

simulinkproject Open Simulink Project and get project object
listRequiredFiles Get project file dependencies
dependencies.fileDependencyAnalysis Find model file dependencies
dependencies.toolboxDependencyAnalysis Find toolbox dependencies

Source Control in Simulink Project

simulinkproject Open Simulink Project and get project object
listModifiedFiles List modified files in Simulink project
listRequiredFiles Get project file dependencies
refreshSourceControl Update source control status of Simulink project files
Simulink.getFileChecksum Checksum of file

Model Exploration

find_system Find systems, blocks, lines, ports, and annotations
find_mdlrefs Find Model blocks and referenced models at all levels or at top level only
Simulink.findVars Analyze relationship between variables and blocks in models
dependencies.fileDependencyAnalysis Find model file dependencies
dependencies.toolboxDependencyAnalysis Find toolbox dependencies
Simulink.MDLInfo Extract model file information without loading block diagram into memory
Simulink.MDLInfo.getDescription Extract model file description without loading block diagram into memory
Simulink.MDLInfo.getMetadata Extract model file metadata without loading block diagram into memory
LibraryBrowser.LibraryBrowser2 Simulink Library Browser

Modeling Guidelines

Model Upgrades

upgradeadvisor Open Upgrade Advisor

Block Creation

Block Masks

Simulink.Mask Control masks programmatically
Simulink.MaskParameter Control mask parameters programmatically
Simulink.dialog.Control Create instances of dialog control

Custom MATLAB Algorithms

MATLAB Algorithm Design

Algorithm Design Basics
coder.allowpcode Control code generation from protected MATLAB files
coder.ceval Call external C/C++ function
coder.cinclude Include header file in generated code
coder.cstructname Name structure in generated code
coder.extrinsic Declare extrinsic function or functions
coder.inline Control inlining in generated code
coder.load Load compile-time constants from MAT-file or ASCII file into caller workspace
coder.nullcopy Declare uninitialized variables
coder.opaque Declare variable in generated code
coder.ref Pass argument by reference
coder.rref Pass argument by reference as read-only input
coder.target Determine if code generation target is specified target
coder.unroll Unroll for-loop by making a copy of the loop body for each loop iteration
coder.varsize Declare variable-size array
coder.wref Pass argument as write-only reference
Data Definition
Variable-Size Data
coder.varsize Declare variable-size array
Structures
coder.cstructname Name structure in generated code
Cell Arrays
coder.cstructname Name structure in generated code
coder.varsize Declare variable-size array
Function Definition
coder.extrinsic Declare extrinsic function or functions
coder.ignoreConst Prevent use of constant value of expression for function specializations
coder.unroll Unroll for-loop by making a copy of the loop body for each loop iteration

Code Generation

coder.allowpcode Control code generation from protected MATLAB files
coder.ceval Call external C/C++ function
coder.cinclude Include header file in generated code
coder.const Fold expressions into constants in generated code
coder.cstructname Name structure in generated code
coder.extrinsic Declare extrinsic function or functions
coder.inline Control inlining in generated code
coder.load Load compile-time constants from MAT-file or ASCII file into caller workspace
coder.opaque Declare variable in generated code
coder.ref Pass argument by reference
coder.rref Pass argument by reference as read-only input
coder.screener Determine if function is suitable for code generation
coder.target Determine if code generation target is specified target
coder.unroll Unroll for-loop by making a copy of the loop body for each loop iteration
coder.wref Pass argument as write-only reference
coder.updateBuildInfo Update build information object RTW.BuildInfo
coder.ExternalDependency Interface to external code
coder.BuildConfig Build context during code generation

Performance

coder.inline Control inlining in generated code
coder.unroll Unroll for-loop by making a copy of the loop body for each loop iteration
coder.const Fold expressions into constants in generated code

Legacy Code Integration

legacy_code Use Legacy Code Tool

Host-Specific Code

MATLAB S-Functions

Simulink.MSFcnRunTimeBlock Get run-time information about Level-2 MATLAB S-function block
Simulink.RunTimeBlock Allow Level-2 MATLAB S-function and other MATLAB programs to get information about block while simulation is running
Simulink.BlockData Provide run-time information about block-related data, such as block parameters
Simulink.BlockPortData Describe block input or output port
Simulink.BlockCompDworkData Provide postcompilation information about block's DWork vector
Simulink.BlockCompInputPortData Provide postcompilation information about block input port
Simulink.BlockCompOutputPortData Provide postcompilation information about block output port
Simulink.BlockPreCompInputPortData Provide precompilation information about block input port
Simulink.BlockPreCompOutputPortData Provide precompilation information about block output port

System Object Integration

Customize System Objects for Simulink

matlab.system.mixin.CustomIcon Custom icon mixin class
matlab.system.display.Icon Custom icon image
matlab.system.display.Action Custom button
matlab.system.display.Header Header for System objects properties
matlab.system.display.Section Property group section for System objects
matlab.system.display.SectionGroup Section group for System objects
matlab.system.mixin.Propagates Signal characteristics propagation mixin class
matlab.system.mixin.Nondirect Nondirect feedthrough mixin class
Was this topic helpful?