Documentation

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

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
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 Hardcopy paper orientation
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
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 structure 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
sldiagnostics Display diagnostic information about Simulink system
Simulink.BlockDiagram.getChecksum Return checksum of model
Simulink.SubSystem.getChecksum Return checksum of nonvirtual subsystem
Simulink.ModelAdvisor Run Model Advisor from MATLAB file
ModelAdvisor.Preferences Set Model Advisor window preferences by specifying which folders and tabs to display

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 structure 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

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 structure 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
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
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 Simulation

Programmatic Simulation

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 structure 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

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.addToRun Add simulation data to existing run
Simulink.sdi.clear Clear all data from Simulation Data Inspector
Simulink.sdi.close Close Simulation Data Inspector
Simulink.sdi.compareRuns Compare signal data between two simulation runs
Simulink.sdi.compareSignals Compare data from two signals
Simulink.sdi.copyRun Create copy of run including simulation output data
Simulink.sdi.copyRunViewSettings Copy signal line style from one run to another run
Simulink.sdi.createRun Create run in Simulation Data Inspector
Simulink.sdi.createRunsFromSimulationOutput Create run from simulation output results
Simulink.sdi.createRunsFromSLDV Import Simulink Design Verifier test case inputs
Simulink.sdi.deleteRun Delete run from Simulation Data Inspector
Simulink.sdi.deleteSignal Delete signal from Simulation Data Inspector
Simulink.sdi.discardDataFromPriorSessions Delete data from prior MATLAB session
Simulink.sdi.getRun ReturnSimulink.sdi.Run object containing simulation output data
Simulink.sdi.getRunCount Return number of runs in Simulation Data Inspector
Simulink.sdi.getRunIDByIndex Return the run ID corresponding to run index
Simulink.sdi.getRunNamingRule Return run naming rule for next Simulation Data Inspector run
Simulink.sdi.getSignal Return Simulink.sdi.Signal object for signal in Simulation Data Inspector
Simulink.sdi.hasDataFromPriorSessions Indicate if data is available from prior MATLAB session
Simulink.sdi.importDataFromPriorSessions Import data from prior MATLAB session
Simulink.sdi.importDataFromWorkers Import data from prior MATLAB session
Simulink.sdi.isValidRunID Determine if run ID is valid
Simulink.sdi.load Load saved Simulation Data Inspector session
Simulink.sdi.refresh Refresh Simulation Data Inspector
Simulink.sdi.report Generate report from Simulation Data Inspector
Simulink.sdi.resetRunNamingRule Reset default run naming rule for next Simulation Data Inspector run
Simulink.sdi.save Save current Simulation Data Inspector session
Simulink.sdi.setRunNamingRule Specify a run naming rule
Simulink.sdi.setRunOverwrite Mark simulation run for overwrite
Simulink.sdi.setSubPlotLayout Set number of subplots
Simulink.sdi.setTableGrouping Change signal grouping hierarchy of Runs pane
Simulink.sdi.view Open Simulation Data Inspector
Simulink.sdi.markSignalForStreaming Turn streaming on or off for a signal
Simulink.sdi.changeLoggedToStreamed Change signals marked for logging to streaming
Simulink.sdi.changeStreamedToLogged Change signals marked for streaming to logging
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.sdi.Dataset Create Simulink.sdi.Dataset object
Simulink.HMI.InstrumentedSignals Access streamed signals in model
Simulink.HMI.SignalSpecification Information required to stream single signal

Control Simulations with Interactive Displays

Simulink.sdi.markSignalForStreaming Turn streaming on or off for a signal
Simulink.sdi.changeLoggedToStreamed Change signals marked for logging to streaming
Simulink.sdi.changeStreamedToLogged Change signals marked for streaming to logging
Simulink.HMI.InstrumentedSignals Access streamed signals in model
Simulink.HMI.SignalSpecification Information required to stream single signal

Test and Debug Simulations

Simulink Debugger

sldebug Start simulation in debug mode

Diagnostics

sldiagnostics Display diagnostic information about Simulink system
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 Add Bus to Vector blocks to convert virtual bus signals into vector signals
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 Convert bus objects to cell array containing bus information
Simulink.Bus.save Save bus objects in MATLAB file
slreplace_mux Replace Mux blocks used to create buses with Bus Creator blocks
Simulink.Bus Specify properties of signal bus
Simulink.BusElement Describe element of signal bus

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.loadProject Load 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
addFile Add file to Simulink Project
addFolderIncludingChildFiles Add folder and child files to Simulink Project
close Close Simulink Project
export Export Simulink Project to zip
findFile Get Simulink Project file by name
isLoaded Determine if Simulink Project is loaded
reload Reload Simulink Project
removeFile Remove file 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
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
removeFile Remove file from Simulink Project
removeLabel Remove label from Simulink Project

Dependency Analysis

simulinkproject Open Simulink Project and get project object
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
refreshSourceControl Update source control status of Simulink project files
Simulink.getFileChecksum Checksum of file

Model Exploration

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 as read input or write output
coder.rref Pass argument by reference as read-only input
coder.target Determine if code generation target is specified target
coder.unroll Copy body of for-loop in generated code for each iteration
coder.varsize Declare variable-size array
coder.wref Pass argument by reference as write-only output
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

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 as read input or write output
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 Copy body of for-loop in generated code for each iteration
coder.wref Pass argument by reference as write-only output
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 Copy body of for-loop in generated code for each 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

Define System Objects

Basic Operations
matlab.System Base class for System objects
matlab.system.mixin.FiniteSource Finite source mixin class
matlab.system.StringSet Set of valid character vector values
Properties and States
matlab.System Base class for System objects
matlab.system.StringSet Set of valid character vector values
Load and Save
matlab.System Base class for System objects
Use in Simulink
Icon and Dialog
matlab.System Base class for System objects
matlab.system.mixin.CustomIcon Custom icon mixin class
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
Input and Output Specifications
matlab.System Base class for System objects
matlab.system.mixin.Propagates Signal characteristics propagation mixin class
Nondirect Feedthrough
matlab.System Base class for System objects
matlab.system.mixin.Nondirect Nondirect feedthrough mixin class
For Each Subsystem
matlab.System Base class for System objects
Was this topic helpful?