# EXAMPLES

COMPONENT: simulink
EXAMPLENAME: ConvertMultipleSubsystemsToReferencedModelsExample
EXAMPLETITLE: Convert Multiple Subsystems to Referenced Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
One call to the Simulink.SubSystem.convertToModelReference function can convert multiple subsystems to referenced models.


COMPONENT: simulink
EXAMPLENAME: DataTypeRulesForProductWithBinaryPointScalingExample
EXAMPLETITLE: Data Type Rules for Product with Binary-Point Scaling
PRODUCT: MATLAB;Simulink;Fixed-Point Designer
DESCRIPTION:
For a product operation, you can specify a data type inheritance rule for the output data type. For this example, assume that both inputs to the Product block are single word and use binary-point scaling. The first input has a data type of ufix32_En6, meaning a 32-bit unsigned fixed-point type with a fraction length of 6. The second input has a data type of ufix32_En4, meaning a 32-bit unsigned fixed-point type with a fraction length of 4. See Fixed-Point Data in MATLAB and Simulink for more information on this notation.


COMPONENT: simulink
EXAMPLENAME: CreateSimulinksdiDatasetRefObjectForRunExample
EXAMPLETITLE: Create Simulink.sdi.DatasetRef Object for Run
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model sldemo_fuelsys uses signal logging to log data for a fault-tolerant fuel control system. Signal logging data is automatically streamed to the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: ArtifAlgLoopsExample
EXAMPLETITLE: Artificial Algebraic Loops
PRODUCT: MATLAB;Simulink
DESCRIPTION:
An artificial algebraic loop occurs when an atomic subsystem or Model block causes Simulink to detect an algebraic loop, even though the contents of the subsystem do not contain a direct feedthrough from the input to the output. When you create an atomic subsystem, all Inport blocks are direct feedthrough, resulting in an algebraic loop.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingKnobBlockExample
EXAMPLETITLE: Change Gain Value Using Knob Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Knob block to set the value of a parameter to one of several values during simulation. For example, in the model knobGain, a Knob block is connected to the Gain parameter of a Gain block. The Knob block is configured such that you can choose a gain value between 0 and 20.


COMPONENT: simulink
EXAMPLENAME: SendAndReceiveMessagesUsingSystemObjectBlocksExample
EXAMPLETITLE: Process Message Payload Using MATLAB System Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Send, receive, and process messages using the MATLAB System block. Use System objects to author blocks to model custom behavior to send and receive messages and manipulate the message payload.


COMPONENT: simulink
EXAMPLENAME: ConfigureSimulationUsingNameValueArgumentsExample
EXAMPLETITLE: Configure Simulation Using Name-Value Arguments
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can configure a simulation of a model to use different values for model configuration parameter values by specifying the configuration parameters for the simulation as name-value arguments for the sim function. The parameter values you specified are applied for the simulation and reverted when the simulation completes.


COMPONENT: simulink
EXAMPLENAME: SimulateModelUsingCurrentConfigurationExample
EXAMPLETITLE: Simulate Model Using Current Configuration
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model IntegrateSine. The model uses an Integrator block to integrate the output of a Sine Wave block. The output from the Integrator block is connected to an Outport block.


COMPONENT: simulink
EXAMPLENAME: SpeedUpObjDetectionUsingHardwareAccExample
EXAMPLETITLE: Use Hardware Acceleration to Speed Up Simulation for Object Detection
PRODUCT: MATLAB;Simulink;Computer Vision Toolbox
DESCRIPTION:
Use hardware acceleration to speed up a Simulink® model simulation for object detection. You can use Performance Advisor to compare simulation speeds and select an appropriate level for hardware acceleration. Hardware acceleration is achieved by leveraging single instruction, multiple data (SIMD) in simulation targets. All processors that support Simulink simulation have SIMD instructions. For more information, see Hardware acceleration and SIMD Code Generation (DSP System Toolbox).


COMPONENT: simulink
EXAMPLENAME: ZeroCrossingDetectionExample
EXAMPLETITLE: Demonstrating Effects of Excessive Zero-Crossing Detection
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Provides three models that illustrate zero-crossing behavior: example_bounce_two_integrators , example_doublebounce , and example_bounce .


COMPONENT: simulink
EXAMPLENAME: SpecifiedDemuxBlockExample
EXAMPLETITLE: Extract Vector Elements Using Specified Output Dimensions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When using the Demux block to extract and output elements from a vector input, you can use -1 in a vector expression to indicate that the block dynamically sizes the corresponding port. When a vector expression comprises both positive values and -1 values, the block assigns as many elements as needed to the ports with positive values. The block distributes the remaining elements as evenly as possible over the ports with -1 values.


COMPONENT: simulink
EXAMPLENAME: InitializeResetAndTerminateFunctionBlocksExample
EXAMPLETITLE: Initialize, Reset, and Terminate State of Simulink Block
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
Use the Initialize Function, Reset Function, and Terminate Function blocks to respond to events in a Simulink model.


COMPONENT: simulink
EXAMPLENAME: CompareSignalsFromDifferentRunsExample
EXAMPLETITLE: Compare Signals from Different Runs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Compare signals from different simulation runs using the Simulation Data Inspector's Simulink.sdi.compareSignals function. When you only have one signal of interest to compare, using a signal comparison returns the Simulink.sdi.diffSignalResult object with the comparison data directly.


COMPONENT: simulink
EXAMPLENAME: ViewSignalHierarchyExample
EXAMPLETITLE: View Signal Hierarchy
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open and compile the example model named busdemo . To compile the model, on the Modeling tab of the Simulink Toolstrip, click Update Model or Run . Compiling the model updates the line styles, which you can use to visually identify buses.


COMPONENT: simulink
EXAMPLENAME: ControlDataTypesWithDataTypeDuplicateBlockExample
EXAMPLETITLE: Control Data Types with the Data Type Duplicate Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Control data types in your model using the Data Type Duplicate block. In this model, the data type of the Constant block (currently single ) drives the data types throughout the model.


COMPONENT: simulink
EXAMPLENAME: GetPathNameOfMostRecentlySelectedBlockExample
EXAMPLETITLE: Get Path Name of Most Recently Selected Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Get the path name of the most recently selected block and of the first block selected by a selection box you draw around multiple blocks.


COMPONENT: simulink
EXAMPLENAME: CalculateRunningMinWithMinMaxRunningResettableBlockExample
EXAMPLETITLE: Calculate the Running Minimum Value with the MinMax Running Resettable Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the MinMax Running Resettable block to calculate the running minimum value. To watch how the running minimum value changes at each time step, you can use the Step Forward button to advance the simulation one step at a time.


COMPONENT: simulink
EXAMPLENAME: ProgrammaticallyConvertSignalUnitsExample
EXAMPLETITLE: Programmatically Convert Signal Units
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the convertUnits function to convert the stored units of a Simulink.sdi.Signal object. This example uses data generated by simulating the model sldemo_autotrans. When you convert the stored units of the Signal object, the Simulation Data Inspector performs a conversion on the data and updates the signal display units any plots that display the signal. Changing the stored units of a Signal object does not affect the model that created the signal.


COMPONENT: simulink
EXAMPLENAME: CreateArrayOfBusesFromStructureExample
EXAMPLETITLE: Create Array of Buses from MATLAB Structures
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Constant block to compactly represent an array of buses with constant-valued bus elements. This technique can reduce the number of lines in a model and the number of variables used by the model, especially when the model repeats an algorithm with different parameter values.


COMPONENT: simulink
EXAMPLENAME: ConnectDashboardBlocksExample
EXAMPLETITLE: Connect Interactive Controls and Displays
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model ConnectDashboardBlocks contains a Sine Wave block and three Constant blocks. The model also contains eight dashboard blocks that are not connected to the model yet. This example shows how to quickly connect multiple dashboard blocks using connect mode, how to connect and tune an interactive control and display using the Block Parameters dialog box, and how to disconnect dashboard blocks from your model.


COMPONENT: simulink
EXAMPLENAME: ExportSignalDataToTimeseriesExample
EXAMPLETITLE: Export Signal Data to Workspace
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a run in the Simulation Data Inspector, access the data, and export the signal data to a timeseries object in the workspace.


COMPONENT: simulink
EXAMPLENAME: TriggerPartitionEachTimeInputPortValueUpdatesExample
EXAMPLETITLE: Trigger Partition Each Time Input Port Value Updates
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model ScaleInput. The model loads external input data into a subsystem. The subsystem contains a Gain block that multiplies the subsystem input by two.


COMPONENT: simulink
EXAMPLENAME: ExportRunDataExample
EXAMPLETITLE: Export Run Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can export data from a run in the Simulation Data Inspector to a Simulink.SimulationData.Dataset object in the base workspace that you can use to further process your data. The method you choose to export your run depends on the processing you do in your script. If you have a run object for the run, you can use the export method to create a Simulink.SimulationData.Dataset object with the run data in the base workspace. If you do not have a run object, use the Simulink.sdi.exportRun function to export the run to the workspace.


COMPONENT: simulink
EXAMPLENAME: ConstructComplexSignalFromMagnitudeAndPhaseAngleBlockExample
EXAMPLETITLE: Construct Complex Signal from Magnitude and Phase Angle
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Magnitude-Angle to Complex block to construct a complex-valued signal. You can provide both the magnitude and phase angle as block inputs, or provide one value as an input, and the other on the block dialog box.


COMPONENT: simulink
EXAMPLENAME: GroupSimulationInputsUsingADatasetObjectExample
EXAMPLETITLE: Group Simulation Inputs Using Dataset Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create data for three simulation input signals and group them in a Dataset object. A simple model loads the contents of the Dataset object using three root-level Inport blocks. Dashboard Scope blocks in the model display each signal created using the loaded input data.


COMPONENT: simulink
EXAMPLENAME: UseLampBlockToIndicateSignalValueExample
EXAMPLETITLE: Use Lamp Block to Indicate Signal Value
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Lamp block to indicate the value of a connected signal. For example, the model lampStep contains a Step block that changes value from 0 to 1 at time 3. The output signal StepSig from the Step block is connected to a Lamp block.


COMPONENT: simulink
EXAMPLENAME: ModelIfActionSubsystemsAndFixedPointDataTypesExample
EXAMPLETITLE: Model with If Action Subsystems and Fixed-Point Data Types
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can implement this block diagram as a model with fixed-point data types. Open this model with fixed-point data types.


COMPONENT: simulink
EXAMPLENAME: AccessAndPlotSimulationOutputDataExample
EXAMPLETITLE: Plot Simulation Output Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model ex_vdp_simout_plot is configured to log signals, outputs, and states and return all logged data as a single simulation output. You can use the plot function to plot the simulation results in the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckDynamicGapBlockExample
EXAMPLETITLE: Check Signal Value with Check Dynamic Gap Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Check if an input signal falls inside a dynamic upper and lower bound using the Check Dynamic Gap block. In this example, the Check Dynamic Gap block compares the value of a tested input signal from a Sine Wave block at the u port to a Ramp block at the max port and a Step block at the min port.


COMPONENT: simulink
EXAMPLENAME: SDIPlotSignalsExample
EXAMPLETITLE: Plot Signals from Simulation Run
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Demonstrates how to access the Simulink.sdi.Run object for a Simulation Data Inspector run created by logging signals. From the Simulink.sdi.Run object you can get Simulink.sdi.Signal objects that contain the logged signal data and metadata. You can use the Signal objects and the plotOnSubPlot function to plot the data in the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: AccessDatasetElementByIndexExample
EXAMPLETITLE: Access Dataset Elements By Index
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulate the model GetDatasetElements, which logs data generated by three source blocks using the Dataset format.


COMPONENT: simulink
EXAMPLENAME: ModelTheComponentsExample
EXAMPLETITLE: Open the System Layout
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A big-picture view of the whole system layout is useful when modeling individual components. Start by loading the layout model. At the MATLAB® command line, enter:


COMPONENT: simulink
EXAMPLENAME: AccessASignalObjectExample
EXAMPLETITLE: Access Signal Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you simulate a model with signals marked for logging, the software saves signal logging information in one or more Simulink.SimulationData.Signal objects.


COMPONENT: simulink
EXAMPLENAME: FindSystemRegularExpressionSearchforPartialMatchExample
EXAMPLETITLE: Regular Expression Search for Partial Match
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you search using regular expressions, you can specify a part of the character vector you want to match to return all objects that contain that character vector.


COMPONENT: simulink
EXAMPLENAME: ScheduleEditorWithExportFunctionExample
EXAMPLETITLE: Schedule an Export-Function Model Using the Schedule Editor
PRODUCT: MATLAB;Simulink
DESCRIPTION:
View and edit the order of function-calls in an export-function model using the Schedule Editor. As in all export-function models, the desired functionality is modeled as function-call subsystems. These function-call subsystems define the partitions that are scheduled by the Schedule Editor.


COMPONENT: simulink
EXAMPLENAME: CompareRunsWithTheSimulinksdiDatasetRefObjectExample
EXAMPLETITLE: Compare Runs with Simulink.sdi.DatasetRef Objects
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model ex_sldemo_absbrake uses a Constant block to specify a slip setpoint for an anti-lock braking system. Simulate the model with two different slip setpoint values, 0.24 and 0.25, and compare the output wheel speed of each simulation run using Simulink.sdi.DatasetRef objects.


COMPONENT: simulink
EXAMPLENAME: GetComparisonResultsForScalarSignalByNameExample
EXAMPLETITLE: Get Comparison Results By Name
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load the Simulation Data Inspector session file getResultsByNameData. The file contains data logged from two simulations of the model getResultsByNameModel, which logs data for five signals.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingRadioButtonBlockExample
EXAMPLETITLE: Change Gain Value Using Radio Button Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Radio Button block to set the value of a connected parameter to one of several values during simulation. For example, in the model radioGain, a Radio Button block is connected to the Gain parameter of a Gain block. The Radio Button block is configured such that you can choose a gain value of 0, 5, 10, or 15.


COMPONENT: simulink
EXAMPLENAME: ModelConstantPropagationDelayExample
EXAMPLETITLE: Model Constant Propagation Delay
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Implement constant propagation delay for variable-step and fixed-step simulations using the Propagation Delay block.


COMPONENT: simulink
EXAMPLENAME: ConvertRepresentationOfMultidimensionalSignalDataExample
EXAMPLETITLE: Convert Representation of Multidimensional Signal Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you analyze multidimensional signal data using the Simulation Data Inspector, you can choose whether to represent the data as a single signal with multidimensional sample values or as a set of signals, called channels, with scalar sample values. Use the Simulation Data Inspector programmatic interface to convert the representation of signal data from channels to a multidimensional signal or from a multidimensional signal to channels.


COMPONENT: simulink
EXAMPLENAME: PlotSignalDuringSimulationUsingDashboardScopeBlockExample
EXAMPLETITLE: Plot Signal During Simulation Using Dashboard Scope Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Dashboard Scope block to plot connected signals during simulation. For example, the model dashScope contains a Dashboard Scope block that is connected to three signals: constSig, rampSig, and sineSig.


COMPONENT: simulink
EXAMPLENAME: IdentifyImplicitBustoVectorConversionsExample
EXAMPLETITLE: Identify Implicit Bus-to-Vector Conversions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Blocks that do not accept buses may implicitly convert buses to vectors. When a bus is treated as a vector, bus elements become inaccessible.


COMPONENT: simulink
EXAMPLENAME: ViewSampleTimeUsingDigitalClockBlockExample
EXAMPLETITLE: View Sample Time Using the Digital Clock Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
View the simulation sample time at a specified sampling interval using the Digital Clock block. In this model, the Scope shows the output of a Digital Clock block with the Sample time set to 0.2 .


COMPONENT: simulink
EXAMPLENAME: DetectIncreaseBlockExample
EXAMPLETITLE: Detect Increasing Signal Values with the Detect Increase Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Detect Increase Block to detect increasing signal values. Because the Initial condition is set to -1 , the block detects an increasing signal value starting at time t=0 . If you change the Initial condition parameter to a nonnegative value, the block detects the first increasing signal value at t=0.25 .


COMPONENT: simulink
EXAMPLENAME: UseTheAlgebraicLoopDiagnosticExample
EXAMPLETITLE: Use the Algebraic Loop Diagnostic
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulink detects algebraic loops during simulation initialization, for example, when you update your diagram. You can set the Algebraic loop diagnostic to report an error or warning if the software detects any algebraic loops in your model.


COMPONENT: simulink
EXAMPLENAME: CopyyAxisRangeFromOneSubplotToAnotherExample
EXAMPLETITLE: Copy y-Axis Range from One Subplot to Another
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Simulink.sdi.getSubplotLimits and Simulink.sdi.setSubplotLimits functions to copy the axis limits from one subplot to another. For example, you can specify the same y-axis limits for two subplots that display the same signal from simulations that used different values of a model parameter. This example copies the y-axis settings from one subplot to another to analyze the effect of changing the value of Mu in the model vdp.


COMPONENT: simulink
EXAMPLENAME: RestoreAllDiagnosticsForASpecifiedModelExample
EXAMPLETITLE: Restore All Diagnostics for a Specified Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To restore all suppressed diagnostics on a specified model, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: LoadDataToModelContinuousInputFromModelHierarchyExample
EXAMPLETITLE: Load Data to Represent Variable-Step Input from Model Hierarchy
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Capture dynamics in external input data for a continuous signal by specifying additional time steps for a variable-step solver.


COMPONENT: simulink
EXAMPLENAME: LogBusSignalsInForEachSubsystemExample
EXAMPLETITLE: Log Buses in For-Each Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Logs two buses, LIMITBUS and COUNTERBUS, in a for-each subsystem using signal logging. The elements of LIMITBUS are logged individually inside the for-each subsystem. The COUNTERBUS data is logged outside the for-each subsystem.


COMPONENT: simulink
EXAMPLENAME: ConvertMultiplePortsIntoABusPortExample
EXAMPLETITLE: Combine Multiple Subsystem Ports into One Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Three ways to simplify a subsystem interface by converting multiple ports and their connected signals into one port and a bus. Model interfaces do not support this automated conversion.


COMPONENT: simulink
EXAMPLENAME: SignBlockBehaviorForRealInputsExample
EXAMPLETITLE: Sign Block Behavior for Real Inputs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How, for vector and matrix inputs, the block outputs a vector or matrix where each element is the sign of the corresponding input element.


COMPONENT: simulink
EXAMPLENAME: DisplaySignalValueUsingHalfGaugeBlockExample
EXAMPLETITLE: Display Signal Value Using Half Gauge Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Half Gauge block to display a connected signal on a semicircular scale during simulation. For example, in the model halfGaugeSine, a Half Gauge block is connected to a sine wave signal named sinSig.


COMPONENT: simulink
EXAMPLENAME: GetValueOfMaskedParameterExample
EXAMPLETITLE: Get Value of Masked Parameter
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can access the value of a masked block parameter using the get_param function with the keyword value.


COMPONENT: simulink
EXAMPLENAME: LogSubsetSamplePointsExample
EXAMPLETITLE: Log Subset of Sample Points
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Simulink.SimulationData.LoggingInfo object to create a set of signal logging override settings for a signal. For example, you can change the decimation settings to log a subset of sample points in a signal.


COMPONENT: simulink
EXAMPLENAME: UnspecifiedDemuxBlockExample
EXAMPLETITLE: Extract Vector Elements and Distribute Evenly Across Outputs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Demux block to distribute an input signal evenly over the desired number of outputs. For an input vector of length 6, when you set the Number of outputs parameter to 3 , the Demux block creates three output signals, each of size 2.


COMPONENT: simulink
EXAMPLENAME: AccessSimulinkSimulationDataBlockPathObjectExample
EXAMPLETITLE: Access Simulink.SimulationData.BlockPath Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model ThreeSigs logs data from a Sine Wave block, a Random Number block, and a Constant block. Simulate the model.


COMPONENT: simulink
EXAMPLENAME: ChangeConstantBlockValueWithPushButtonBlockExample
EXAMPLETITLE: Change Constant Block Value with Push Button Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Push Button block to change the value of a connected variable or parameter during simulation. For example, in the model pushIncrease, a Push Button block named Increase amplitude is connected to the Value parameter of a Constant block. When you press the Push Button block, the value of the Constant block changes to 5.


COMPONENT: simulink
EXAMPLENAME: DisplaySignalValueUsingGaugeBlockExample
EXAMPLETITLE: Display Signal Value Using Gauge Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Gauge block to display a connected signal on a circular scale during simulation. For example, in the model gaugeSine, a Gauge block is connected to a sine wave signal named sinSig.


COMPONENT: simulink
EXAMPLENAME: PartiallySpecifySimulationInputForABusExample
EXAMPLETITLE: Partially Specify Simulation Input for a Bus
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Simulink.SimulationData.createStructOfTimeseries function to create partially specified simulation input for a bus. This example logs data from ex_log_structtimeseries and then loads that data into ex_load_structtimeseries .


COMPONENT: simulink
EXAMPLENAME: TriggerPartitionEachTimeSampleOverwrittenInQueueExample
EXAMPLETITLE: Trigger Partition Each Time Sample Overwritten in Queue
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Configure a model to execute a partition each time an incoming value overwrites unprocessed data in a queue.


COMPONENT: simulink
EXAMPLENAME: DataTypeInheritanceRulesForProductWithSlopeScalingExample
EXAMPLETITLE: Data Type Inheritance Rules for Product with Slope Scaling
PRODUCT: MATLAB;Simulink;Fixed-Point Designer
DESCRIPTION:
For a product operation, you can specify a data type inheritance rule for the output data type. For this example, assume that both inputs to the product block are single word and use slope scaling. The first input has a data type of ufix32_S1p2, meaning a 32-bit unsigned fixed-point type with a slope of 1.2. The second input has a data type of ufix32_En2, meaning a 32-bit unsigned fixed-point type with a fraction length of 2. See Fixed-Point Data in MATLAB and Simulink for more information on this notation.


COMPONENT: simulink
EXAMPLENAME: CreateDashboardPanelForClimateControlSystemExample
EXAMPLETITLE: Create Dashboard Panel for Climate Control System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a climate control screen for an automotive infotainment system, modeled as a dashboard panel. You can use panels to model and test the user interface of a real system. To model displays and controls on the panel, such as gauges, lamps, knobs, buttons, and switches, you can promote dashboard blocks to the panel. Dashboard blocks are blocks from the Dashboard library, the Customizable Blocks library, and the Aerospace Blockset™ Flight Instruments library.


COMPONENT: simulink
EXAMPLENAME: IteratedAssignmentWithTheAssignmentBlockExample
EXAMPLETITLE: Iterated Assignment with the Assignment Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Assignment block to assign values computed in a For or While Iterator loop to successive elements.


COMPONENT: simulink
EXAMPLENAME: ParseNMEAGPSTextMessagesUsingSimulinkAndPythonExample
EXAMPLETITLE: Integrate Python GPS Text Message Parsing Algorithms in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Parse text messages in NMEA GPS format using Simulink® string blocks and Python®. NMEA sentences are used for communication between marine devices, and the model in the example decodes RMB and RMC sentences in NMEA. RMB is the sentence for the recommended navigation data for GPS. RMC is the sentence for the recommended minimum data for GPS sentences.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckDynamicRangeBlockExample
EXAMPLETITLE: Check Signal Range with Check Dynamic Range Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can check if an input signal falls outside of a dynamic upper and lower bound by using the Check Dynamic Range block.


COMPONENT: simulink
EXAMPLENAME: TestRatebasedModelSimulationExample
EXAMPLETITLE: Simulate Test Harness for Rate-Based Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The ex_model_test_harness_with_subsystems model uses Function-Call Generator blocks to test the simulation of a rate-based model.


COMPONENT: simulink
EXAMPLENAME: UseSimulationPacingWithDashboardBlocksExample
EXAMPLETITLE: Use Simulation Pacing with Dashboard Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use dashboard blocks to view signals and tune variable and parameter values in your model while slowing a simulation using simulation pacing. Using dashboard blocks with simulation pacing allows you to build an intuitive understanding of your model and how the model responds to changes as you tune parameters in your model.


COMPONENT: simulink
EXAMPLENAME: CompareTwoModelsOnDiskExample
EXAMPLETITLE: Compare Two Models on Disk
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You assign a new hire a task to improve the readability of the mysimple_stats_block1.slx model. You share the model in an email attachment.


COMPONENT: simulink
EXAMPLENAME: GenerateLinearModelsUsingTriggerSignalExample
EXAMPLETITLE: Generate Linear Models for a Rising Edge Trigger Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use state and simulation time logging to extract the model states at operating points. In this example, the model is configured to get the states when the x1 signal triggers the Trigger-Based Linearization block on a rising edge.


COMPONENT: simulink
EXAMPLENAME: PassStatesBetweenEnabledSubsystemsExample
EXAMPLETITLE: Pass States Between Enabled Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the state port to prevent creating an algebraic loop when you need an Integrator block in one enabled subsystem to use the state of an Integrator block in another enabled subsystem.


COMPONENT: simulink
EXAMPLENAME: BumplessControlTransferBlockExample
EXAMPLETITLE: Bumpless Control Transfer
PRODUCT: MATLAB;Simulink
DESCRIPTION:
This example shows how to use signal tracking to achieve bumpless control transfer in a system that switches between a PID Controller block and another controller.


COMPONENT: simulink
EXAMPLENAME: DetectChangeInSignalValuesBlockExample
EXAMPLETITLE: Detect Change in Signal Values
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Detect a change in signal values using the Detect Change block. When the input from the Pulse Generator block remains the same, the Detect Change block outputs zero (false), indicating that there was no change in signal values. When the value of the Pulse Generator block changes, the Detect Change block outputs one (true) indicating that the current signal value does not equal its previous value.


COMPONENT: simulink
EXAMPLENAME: SelectElementsFromInputBusElementPortExample
EXAMPLETITLE: Select Elements of Subsystem Input Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To select elements from an input bus element port, use an In Bus Element block for each element that you want to select.


COMPONENT: simulink
EXAMPLENAME: OneBasedIndexingMultiportSwitchBlockExample
EXAMPLETITLE: One-Based Indexing for Multiport Switch Data Ports
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The sf_semantics_hotel_checkin model uses a Multiport Switch block. This block uses one-based indexing for contiguous ordering of three data ports.


COMPONENT: simulink
EXAMPLENAME: IntroduceADelayToRemoveAlgebraicLoopsExample
EXAMPLETITLE: Remove Algebraic Loops by Introducing Delay
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Feedback loops can create algebraic loops in a model. You can remove these algebraic loops by introducing a delay in the loop using the Unit Delay block.


COMPONENT: simulink
EXAMPLENAME: DetermineWhetherSubsystemIsVirtualExample
EXAMPLETITLE: Determine Whether Subsystem Is Virtual
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To determine whether a subsystem is virtual, use the get_param function with the Boolean block parameter IsSubsystemVirtual.


COMPONENT: simulink
EXAMPLENAME: SimulateModelInParallelWithParsimExample
EXAMPLETITLE: Simulate Model in Parallel with parsim
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulate the model, CSTR, in parallel by sweeping over a variable. An array of SimulationInput objects is used to perform the sweep.


COMPONENT: simulink
EXAMPLENAME: ExamineTheTriggersModelExample
EXAMPLETITLE: Examine the Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model in this example generates two logged output signals. Both signals are created by passing the output of a Sine Wave block through a switch. Both switches are configured to allow the sine signal through when the control signal is greater than zero. The switch for the first output is controlled by user input supplied using the Push Button block. The switch for the second output is controlled by the output of a Pulse Generator block.


COMPONENT: simulink
EXAMPLENAME: InitializeSignalElementswithaNondoubleDataTypeExample
EXAMPLETITLE: Initialize Signal Elements that Use a Data Type Other than Double
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a MATLAB structure for a bus whose signal elements use a data type other than double . Use a partial structure to specify initialization values for a subset of the elements. When you create the partial structure, match the data types of the fields with the data types of the corresponding elements.


COMPONENT: simulink
EXAMPLENAME: LookupTableDynamicExample
EXAMPLETITLE: Approximating the sinh Function Using the Lookup Table Dynamic Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Lookup Table Dynamic block to approximate the sinh function. The breakpoint data is given by the vector [-5:5] and the table data is given by the vector sinh([-5:5]) . The input x is provided by the Constant block as a 1-by-3 vector containing values that are below, within, and above the breakpoint data values.


COMPONENT: simulink
EXAMPLENAME: CheckStairResolutionWithCheckInputResolutionBlockExample
EXAMPLETITLE: Check Signal Resolution with Check Input Resolution Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Check Input Resolution block to check when a signal has a specified resolution. The block can help verify if a signal is quantized within specification, such as when checking the output of an analog-to-digital converter.


COMPONENT: simulink
EXAMPLENAME: DataTypeInheritRulesAddSlopeScalingMultiWordExample
EXAMPLETITLE: Data Type Inheritance Rules for Add with Slope Scaling when Ideal Result Type is Multi-Word
PRODUCT: MATLAB;Simulink;Fixed-Point Designer
DESCRIPTION:
For an addition operation, you can specify a data type inheritance rule separately for the accumulator type and the output data type. For this example, assume that both inputs to the sum block are single word and use slope scaling. The first input has a data type of ufix32_Sp4, meaning a 32-bit unsigned fixed-point type with a slope of 0.4. The second input has a data type of ufix32_En6, meaning a 32-bit unsigned fixed-point type with 6 bits of fraction. See Fixed-Point Data in MATLAB and Simulink for more information on this notation.


COMPONENT: simulink
EXAMPLENAME: UseRegularExpressionsToFindElementsInDatasetObjectExample
EXAMPLETITLE: Use Regular Expressions to Find Elements in Dataset Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the find function to access a collection of elements in a Simulink.SimulationData.Dataset object using regular expressions. The model sldemo_clutch, which models a rotating clutch system, logs ten signals in Dataset format. For more information about the model, see Building a Clutch Lock-Up Model.


COMPONENT: simulink
EXAMPLENAME: SignBlockBehaviorForComplexIssuesExample
EXAMPLETITLE: Sign Block Behavior for Complex Issues
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How, when an element of a vector or matrix input is complex, the block uses the same formula that applies to scalar input.


COMPONENT: simulink
EXAMPLENAME: DetectFallNonpositiveBlockExample
EXAMPLETITLE: Detect Falling Edge Using the Detect Fall Nonpositive Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Detect Fall Nonpositive block to detect a falling edge in the input signal. The block detects a falling edge when the signal value decreases from a strictly positive value to a nonpositive value. In this example, the Initial condition of the Detect Fall Nonpositive block is set to 1 . This means that the Boolean expression U/z <= 0 evaluates to true and the block assumes the initial value of the input signal is nonpositive.


COMPONENT: simulink
EXAMPLENAME: ModifyRunNamingRuleThenRestoreDefaultExample
EXAMPLETITLE: Modify Run Naming Rule Then Restore Default
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Simulation Data Inspector API to modify the Simulation Data Inspector run naming rule, check a run's name, restore default preferences, and check the run naming rule.


COMPONENT: simulink
EXAMPLENAME: AccessLoggedParameterDataExample
EXAMPLETITLE: Access Logged Parameter Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Parameter data automatically logs to the Simulation Data Inspector when you connect a Dashboard block to a block parameter. Parameter data does not export to the workspace with other simulation data at the end of simulation. You can access the logged parameter data by exporting the associated run from the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: GetSignalIDsForAllSignalsInARunExample
EXAMPLETITLE: Get Signal IDs for All Signals in a Run
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the getAllSignalIDs function to access an array containing the signal IDs for all the signals in a run. This example simulates the slexAircraftExample model to create run data and then shows how to get the signal IDs for the signals in the run and use the IDs to compare the signals.


COMPONENT: simulink
EXAMPLENAME: UnboundedVariableSizeSignalsBetweenModelComponentsExample
EXAMPLETITLE: Use Unbounded Variable-Size Signals Between Model Components
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
Use unbounded variable-size signals to handle unbounded-size data between different model components. The example also shows how to prepare the model for C++ code generation.


COMPONENT: simulink
EXAMPLENAME: CreateSelfResettingIntegratorExample
EXAMPLETITLE: Create Self-Resetting Integrator
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you need an Integrator block to reset based on the block output value, you can use the state port to avoid creating an algebraic loop.


COMPONENT: simulink
EXAMPLENAME: ConfigurePrelookupBlockToOutputIndexAndFractionAsABusExample
EXAMPLETITLE: Configure the Prelookup Block to Output Index and Fraction as a Bus
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Output a bus containing the index ( k ) and fraction ( f ) from the Prelookup block. The bus object can then be used as an input to the Interpolation Using Prelookup block. The example also shows how to get the same results without using a bus object.


COMPONENT: simulink
EXAMPLENAME: ExamineTheTimeAxisUsabilityModelExample
EXAMPLETITLE: Open and Simulate the Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
This model generates four logged signals: Sine Wave, Pulse, Sawtooth and Output. The Switch block is configured to allow the sine signal to pass through when the output of the Pulse Generator block is greater than zero. When the output of the Pulse Generator block is less than or equal to zero, the Switch block allows the sawtooth signal to pass through.


COMPONENT: simulink
EXAMPLENAME: OpticalFlowByUsingNeighborhoodProcessingSubsystemBlocksExample
EXAMPLETITLE: Calculate Optical Flow by Using Neighborhood Processing Subsystem Blocks
PRODUCT: MATLAB;Simulink;Computer Vision Toolbox
DESCRIPTION:
Use Neighborhood Processing Subsystem blocks to calculate the apparent motion of objects in a video.


COMPONENT: simulink
EXAMPLENAME: UseMultiStateImageBlockToIndicateSignalValueExample
EXAMPLETITLE: Use MultiStateImage Block to Indicate Signal Value
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model MultiStateImagePulse contains a Pulse Generator block connected to a Display block. The Pulse Generator block generates a square wave pulse with an amplitude of 1 every other second. A MultiStateImage block is connected to the pulseSig signal. The block is configured to display the image of an up arrow when the signal has a value of 1 and a down arrow when the signal has a value of 0.


COMPONENT: simulink
EXAMPLENAME: SumBlockReordersInputsExample
EXAMPLETITLE: Sum Block Reorders Inputs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How the Sum block reorders inputs. If you use a - sign as the first operation, the block reorders the inputs, if possible, to use a + operation. For example, in the expression output = -a-b+c , the Sum block reorders the input so that output = c-a-b . To initialize the accumulator, the Sum block uses the first + input port.


COMPONENT: simulink
EXAMPLENAME: InspectContentsOfSimulinkSimulationOutputObjectExample
EXAMPLETITLE: Inspect Contents of Simulink.SimulationOutput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A Simulink.SimulationOutput object contains all data logged from simulation as well as simulation metadata and error messages that occur during simulation. You can use the who function to list properties on a Simulink.SimulationOutput object created by logging data from simulation or by a user.


COMPONENT: simulink
EXAMPLENAME: ReportCompileTimeAndMemoryStatisticsExample
EXAMPLETITLE: Report Compile Time and Memory Statistics
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Generate time and memory used by the model to compile and use this information to evaluate the performance of a model.


COMPONENT: simulink
EXAMPLENAME: AccessDatasetDataProgrammaticallyExample
EXAMPLETITLE: Access Dataset Object and Elements Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model sldemo_fuelsys, which models a fault-tolerant fuel control system. For more information about the model, see Model a Fault-Tolerant Fuel Control System.


COMPONENT: simulink
EXAMPLENAME: HorizontalMatrixConcatenationInMatrixConcatenateBlockExample
EXAMPLETITLE: Horizontally Concatenate Matrices
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When a Matrix Concatenate block receives 2-D matrices with the same number of rows, you can horizontally concatenate the matrices, placing them side-by-side in the output matrix. To horizontally concatenate the matrices, set the Concatenate dimension block parameter to 2 .


COMPONENT: simulink
EXAMPLENAME: SpecifyExternalInputDataUsingDatasetObjectExample
EXAMPLETITLE: Specify External Input Data Using Dataset Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When your model contains several top-level input ports, you can specify the input data to load as a Simulink.SimulationData.Dataset object that contains an element with the data for each input port. The first element in the object contains the data for the input port with a port number of 1, the second element contains the data for the input port with a port number of 2, and so on.


COMPONENT: simulink
EXAMPLENAME: WorkingWithReinitializeFunctionBlockUpdatedExample
EXAMPLETITLE: Working with the Reinitialize Function Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a Reinitialize Function block to reset the initial condition of a Discrete-Time Integrator block for every function-call event received by a subsystem. In this example, the Reinitialize Function block is inside a subsystem, and the subsystem receives a function-call event at every five simulation time steps.


COMPONENT: simulink
EXAMPLENAME: SetLoggingModeOfModelLoggingOverrideObjectExample
EXAMPLETITLE: Set Logging Mode of Model Logging Override Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the setLogAsSpecifiedInModel function to override signal logging settings specified in a model. For example, you can log only the top model or only a referenced model in a model hierarchy. The model sldemo_mdlref_bus contains a Model block named CounterA that references the model sldemo_mdlref_counter_bus. In total, four signals are marked for logging. The top model has three signals marked for logging: COUNTERBUS, INCREMENTBUS, and OUTERDATA. The referenced model has one signal marked for logging: INNERDATA.


COMPONENT: simulink
EXAMPLENAME: FindElementsInDatasetObjectExample
EXAMPLETITLE: Find Elements in Dataset Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the find function to access an element or collection of elements in a Simulink.SimulationData.Dataset object. The model sldemo_clutch, which models a rotating clutch system, logs ten signals in Dataset format. For more information about the model, see Building a Clutch Lock-Up Model.


COMPONENT: simulink
EXAMPLENAME: OverrideParametersInAConfigurationReferenceExample
EXAMPLETITLE: Override Parameters in a Configuration Reference
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Programmatically override a parameter in a configuration reference and set a value that is different from the referenced configuration set.


COMPONENT: simulink
EXAMPLENAME: RefreshModelBlocksProgrammaticallyExample
EXAMPLETITLE: Refresh Model Blocks Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can programmatically refresh all Model blocks in a model with the Simulink.BlockDiagram.refreshBlocks function.


COMPONENT: simulink
EXAMPLENAME: FunctionCallSubsystemsWithMultipleInitiatorsExample
EXAMPLETITLE: Function-Call Subsystems with Multiple Initiators
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
A function-call subsystem that is called by multiple different function-call initiators that are grouped by a Mux block.


COMPONENT: simulink
EXAMPLENAME: SaveASimulationDataInspectorSessionExample
EXAMPLETITLE: Save a Simulation Data Inspector Session
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Creates, saves, and loads a Simulation Data Inspector session. The example logs data in the model slexAircraftExample and visualizes the logged data in a Simulation Data Inspector session. Each time you use the Simulation Data Inspector, you create and modify a session. You can save the data and associated visualization settings for a session in an MLDATX file using the Simulink.sdi.save function. When you want to review the data later, you can load the session using the Simulink.sdi.load function.


COMPONENT: simulink
EXAMPLENAME: RouteLinesAffectedByScriptExample
EXAMPLETITLE: Route Lines Affected by Script
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When the LineUpdate model parameter is set to 'deferred' , scripts postpone line routing until they pause, complete, or run the Simulink.BlockDiagram.routeLine('DeferredLines') command.


COMPONENT: simulink
EXAMPLENAME: ViewSimulationDataUsingTheTimePlotExample
EXAMPLETITLE: View Simulation Data Using Time Plot
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Plot time series data using the Simulation Data Inspector. Simulation data for this example is generated from a simulation of the slexAircraftExample model that logs the output of the Actuator Model block and the Stick, alpha, rad, and q, rad/sec signals.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckStaticGapBlockExample
EXAMPLETITLE: Check Signal Value with Check Static Gap Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Check Static Gap block, you can check if an input signal enters an unchanging gap of values.


COMPONENT: simulink
EXAMPLENAME: CustomizeHighlightingStyleExample
EXAMPLETITLE: Customize Highlighting Style
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can customize a highlighting style by setting the 'HiliteAncestorsData' parameter on the root-level model using the set_param function.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingSliderBlockExample
EXAMPLETITLE: Change Gain Value Using Slider Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Slider block to change the value of a connected block parameter before or during simulation. For example, in the model sliderGain, a Slider block is connected to the Gain parameter of a Gain block.


COMPONENT: simulink
EXAMPLENAME: CreateATallTimetableForASimulationDataInspectorSignalExample
EXAMPLETITLE: Create Tall Timetable for Simulation Data Inspector Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a tall timetable for a signal in the Simulation Data Inspector repository. You can create a tall timetable for a signal in the Simulation Data Inspector repository using a Simulink.sdi.Signal object or by first creating a matlab.io.datastore.sdidatastore object for the signal. You can use a matlab.io.datastore.sdidatastore object to incrementally read and process signal data for signals that do not fit into memory. A tall timetable handles the data chunking and processing in the background. In general, you can work with tall timetables very similarly to how you work with in-memory data.


COMPONENT: simulink
EXAMPLENAME: CreateAndSaveSimulinkBusObjectsInAFunctionExample
EXAMPLETITLE: Create and Save Simulink.Bus Objects in Function
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create Simulink.Bus objects from a Bus Creator block and save the Simulink.Bus object definitions in a function.


COMPONENT: simulink
EXAMPLENAME: GetComparisonResultsForBusSignalByNameExample
EXAMPLETITLE: Get Comparison Results for Bus
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load the Simulation Data Inspector session file getResultsByNameData. The file contains data logged from two simulations of the model getResultsByNameModel, which logs data for five signals, including a bus.


COMPONENT: simulink
EXAMPLENAME: GetAllSSuppressedDiagnosticObjectsOnASpecificBlockExample
EXAMPLETITLE: Get All Simulink.SuppressedDiagnostic Objects on a Specific Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To get all suppressed diagnostics associated with a specified block, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: UseParameterWriterBlockInsideAnInitializeFunctionExample
EXAMPLETITLE: Use Parameter Writer Block to Change Parameter of Block Inside Referenced Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a Parameter Writer block inside an Initialize Function block to change the Gain parameter of a Gain block in a referenced model.The Gain parameter is configured to change at every instance of the model.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingEditBlockExample
EXAMPLETITLE: Change Gain Value Using Edit Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use an Edit block to set the value of a connected parameter before or during simulation. For example, in the model editGain, an Edit block is connected to the Gain parameter of a Gain block.


COMPONENT: simulink
EXAMPLENAME: GetComparisonResultsForComplexSignalByNameExample
EXAMPLETITLE: Get Comparison Results for Complex Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load the Simulation Data Inspector session file getResultsByNameData. The file contains data logged from two simulations of the model getResultsByNameModel, which logs data for five signals, including the complex signal ComplexOut.


COMPONENT: simulink
EXAMPLENAME: StructureBasedOnBusObjectAndPartialStructOfTimeseriesExample
EXAMPLETITLE: Use Logged Bus Data as Simulation Input
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Simulink.Simulationdata.createStructOfTimeseries function to create structures of timeseries objects to use as simulation input for bus signals. This example shows you how to create a structure of timeseries to load into a model using timeseries data logged from a different simulation.


COMPONENT: simulink
EXAMPLENAME: FunctionAndFunctionCallerBlocksInSeparateExample
EXAMPLETITLE: Function and Function Caller Blocks in Separate Referenced Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A parent model that contains two referenced models. One referenced model has a Function Caller block, while the other referenced model has a Simulink Function block that specifies a global function.


COMPONENT: simulink
EXAMPLENAME: OutputSignalWithoutBusExample
EXAMPLETITLE: Output Signal with Bus Element Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you have only one Out Bus Element block for a port, you can pass the block input to the output port without nesting it in a bus.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckDiscreteGradientBlockExample
EXAMPLETITLE: Check Signal Slope with Check Discrete Gradient Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Check Discrete Gradient block, you can check if the absolute value of the difference between successive samples of a signal is less than a defined value.


COMPONENT: simulink
EXAMPLENAME: TestPartitionabilityOfSimulationDatastoreExample
EXAMPLETITLE: Test Partitionability of SimulationDatastore Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you have a matlab.io.datastore.SimulationDatastore object that contains big data from a simulation, you can determine the partitionability of the SimulationDatastore using the isPartitionable function.


COMPONENT: simulink
EXAMPLENAME: GroupMultipleModelArgumentsIntoASingleStructureExample
EXAMPLETITLE: Group Multiple Model Arguments into a Single Structure
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Programmatically configure multiple instances of a referenced model to use different values for the same block parameter by using structures.


COMPONENT: simulink
EXAMPLENAME: RestoreAllDiagnosticsForASpecifiedBlockExample
EXAMPLETITLE: Restore All Diagnostics for a Specified Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To restore all suppressed diagnostics on a specified block, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: CopyViewSettingsToARunExample
EXAMPLETITLE: Copy View Settings to Run
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Copy view settings from one run to another and create figures using the Simulink.sdi.CustomSnapshot object.


COMPONENT: simulink
EXAMPLENAME: DataTypeInheritRulesAddBinaryPointScalingMultiWordExample
EXAMPLETITLE: Data Type Inheritance Rules for Add with Binary-Point Scaling When Ideal Type is Multi-Word
PRODUCT: MATLAB;Simulink;Fixed-Point Designer
DESCRIPTION:
For an addition operation, you can specify a data type inheritance rule separately for the accumulator type and the output data type. For this example, assume that both inputs to the sum block are single word and use binary-point scaling. The first input has a data type of ufix32_En6, meaning a 32-bit unsigned fixed-point type with a fraction length of 6. The second input has a data type of ufix32_En4, meaning a 32-bit unsigned fixed-point type with a fraction length of 4. See Fixed-Point Data in MATLAB and Simulink for more information on this notation.


COMPONENT: simulink
EXAMPLENAME: CreateCustomMappingFileFunctionExample
EXAMPLETITLE: Files for Custom Mapping Workflow
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a custom mapping file function if you do not want to use the map modes in the Root Inport Mapper tool.


COMPONENT: simulink
EXAMPLENAME: TestShuffleabilityOfSimulationDatastoreExample
EXAMPLETITLE: Test Shuffleability of SimulationDatastore Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you have a matlab.io.datastore.SimulationDatastore object that contains big data from a simulation, you can determine the shuffleability of the SimulationDatastore using the isShuffleable function.


COMPONENT: simulink
EXAMPLENAME: UseAQueueBlockToManageMessagesExample
EXAMPLETITLE: Use a Queue Block to Manage Messages
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use FIFO queue, LIFO queue, and priority queue to sort and store messages and define queue policies.


COMPONENT: simulink
EXAMPLENAME: ProcessSignalDataUsingAMatlabiodatastoresdidatastoreExample
EXAMPLETITLE: Process Signal Data Using matlab.io.datastore.sdidatastore Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A matlab.io.datastore.sdidatastore object references signal data in the Simulation Data Inspector repository. When the signal is too large to fit into memory, you can use the sdidatastore object to incrementally process the data manually or to create a tall timetable for the signal that handles the incremental processing for you.


COMPONENT: simulink
EXAMPLENAME: ProgrammaticallyPopulateAndArrangeAModelExample
EXAMPLETITLE: Arrange Programmatically Populated Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use Simulink.BlockDiagram.arrangeSystem with any open model, and it is particularly useful with models you populate programmatically.


COMPONENT: simulink
EXAMPLENAME: SaveAndReuseAViewExample
EXAMPLETITLE: Save and Use a View
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Visualizes the output from the ex_vdp model, saves the configuration as a view, and then uses the view to visualize the output from another simulation of the same model.


COMPONENT: simulink
EXAMPLENAME: InteractivelySimulateAVehicleClimateControlSystemExample
EXAMPLETITLE: Interactively Simulate Vehicle Climate Control System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a dashboard of controls and indicators to interact with the simulation of an automobile climate control system.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingComboBoxBlockExample
EXAMPLETITLE: Change Gain Value Using Combo Box Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Combo Box block to set the value of a parameter to one of several choices before or during simulation. For example, in the model comboBoxGain, a Combo Box block is connected to the Gain parameter of a Gain block. The Combo Box block is configured such that you can choose a gain value of 0, 5, 10, or 15.


COMPONENT: simulink
EXAMPLENAME: AccessDataLoggedAsSingleSimulationOutputExample
EXAMPLETITLE: Access Data in Simulink.SimulationOutput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you simulate a model in a way that returns simulation results as a single object, you access all logged data and simulation metadata using the Simulink.SimulationOutput object.


COMPONENT: simulink
EXAMPLENAME: SelectEntireInputFromBusElementPortExample
EXAMPLETITLE: Select Entire Input from Bus Element Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The input to a bus element port can be a bus, signal, or message. To pass the entire input through an In Bus Element block instead of selecting an element of an input bus, remove the part of the block label that represents an element.


COMPONENT: simulink
EXAMPLENAME: LoadDataAsDiscreteSignalExample
EXAMPLETITLE: Load Data as Discrete Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The values for a discrete signal change only at specific times, typically represented as an evenly spaced vector of sample times. Between each sample of the signal, the signal value remains the same. To load input data as a discrete signal, choose an input data format, use zero-order-hold interpolation, and specify a sample time for the loading block.


COMPONENT: simulink
EXAMPLENAME: AccessSimulationDataInspectorRunsExample
EXAMPLETITLE: Access Simulation Data Inspector Runs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Many tasks performed using the Simulation Data Inspector programmatic interface start by accessing the Simulink.sdi.Run object that corresponds to the logged or imported data you want to analyze. For example, you can use the Run object to access the Simulink.sdi.Signal objects that correspond to individual signals in the run.


COMPONENT: simulink
EXAMPLENAME: FunctionCallFeedbackLatchParentChildBlockExample
EXAMPLETITLE: Function-Call Feedback Latch on Feedback Signal Between Child and Parent
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In this model, the Function-Call Feedback Latch block is on the feedback signal between the child and the parent.


COMPONENT: simulink
EXAMPLENAME: ImplementTaskParallelismInSimulinkExample
EXAMPLETITLE: Implement Task Parallelism in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Implement task parallelism for a system represented in a Simulink® model. The ex_task_parallelism_initial model consists of an input, functional components applied to the same input, and a concatenated output. For more information on task parallelism, see Types of Parallelism.


COMPONENT: simulink
EXAMPLENAME: Extract3by2SubmatrixFromInputSignalExample
EXAMPLETITLE: Extract 3-by-2 Submatrix from Input Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Submatrix block to extract a 3-by-2 submatrix from the lower-right corner of a 5-by-7 input matrix. The following figure illustrates the operation of the Submatrix block with a 5-by-7 input matrix of random integer elements, randi([0 9],5,7) .


COMPONENT: simulink
EXAMPLENAME: AccessLoggedBusDataExample
EXAMPLETITLE: Access Bus Data Logged Using Dataset Format
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model AccessDatasetNestedBus contains nested arrays of buses. Two arrays of buses, Bus2 and Bus3, are marked for logging. topBus is logged using an Outport block. This example shows how to access Dataset elements within the bus hierarchy.


COMPONENT: simulink
EXAMPLENAME: SweepParameterValueAndInspectResultsExample
EXAMPLETITLE: Sweep Parameter Value and Inspect Simulation Results
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Change a block parameter value between multiple programmatic simulation runs. Use this technique to determine an optimal parameter value by comparing the output signal data of each run.


COMPONENT: simulink
EXAMPLENAME: ControlASimulinkSimulationAppDesignerExample
EXAMPLETITLE: Control a Simulink Simulation with App Designer
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Bind variables and signals in the Simulink model with UI components in an App Designer app. The app also provides and interface to control a simulation for a Simulink model.


COMPONENT: simulink
EXAMPLENAME: ConvertSignalsBetweenContinuousAndDiscreteTimeExample
EXAMPLETITLE: Convert Signals Between Continuous Time and Discrete Time
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The sldemo_fuelsys model shows how to use the Rate Transition block to convert signals between continuous time and discrete time.


COMPONENT: simulink
EXAMPLENAME: FindDuplicateInBusElementBlocksExample
EXAMPLETITLE: Find Duplicate In Bus Element Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When multiple In Bus Element blocks select the same element, selecting one of the blocks highlights the other blocks that select the same element.


COMPONENT: simulink
EXAMPLENAME: GetSignalIDsBySignalNameExample
EXAMPLETITLE: Get Signal IDs by Signal Name
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can access signal IDs for signals inside a Simulink.sdi.Run object by specifying the name of the signal for which you want the signal ID. You can use the signal ID to compare signals using the Simulink.sdi.compareSignals function, access the Simulink.sdi.Signal object for the signal using the Simulink.sdi.getSignal function, or delete the signal from the Simulation Data Inspector using the Simulink.sdi.deleteSignal function.


COMPONENT: simulink
EXAMPLENAME: CompareAndMergeSimulinkModelsExample
EXAMPLETITLE: Compare and Merge Simulink Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the comparison report in MATLAB® to understand what has changed between two different designs. It shows how to view and merge the changes between two Simulink® models from the comparison report.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingCheckBoxBlockExample
EXAMPLETITLE: Change Gain Value Using Check Box Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Check Box block to set the value of a parameter or variable during simulation. For example, in the model checkBoxGain, a Check Box block is connected to the Gain parameter of a Gain block. To view or set the block parameters, double-click the block.


COMPONENT: simulink
EXAMPLENAME: CompareSimulationDataSetupExample
EXAMPLETITLE: Setup
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Continues from Inspect Simulation Data. You can also use this script to generate the data required for the example.


COMPONENT: simulink
EXAMPLENAME: DirectLookupTableBlockTableDataAsInputExample
EXAMPLETITLE: Providing Table Data as an Input to the Direct Lookup Table Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Provide table data as an input to the Direct Lookup Table block. In the following model, a is a 4-D array of linearly increasing values that you define with the following model preload function:


COMPONENT: simulink
EXAMPLENAME: CreateSimulinkSimulationDataBlockPathObjectExample
EXAMPLETITLE: Create Simulink.SimulationData.BlockPath Object Using Cell Array
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model sldemo_mdlref_basic, which contains three Model blocks: CounterA, CounterB, and CounterC. The Model blocks reference the same model reference, sldemo_mdlref_counter.


COMPONENT: simulink
EXAMPLENAME: RestoreAllDiagnosticsForASpecifiedSystemExample
EXAMPLETITLE: Restore All Diagnostics for a Specified System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To restore all suppressed diagnostics on a specified subsystem, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: FinalStateInformationinStructurewithDatasetFormatExample
EXAMPLETITLE: Access Final State Information Saved Using Dataset Format
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can save final state information using the Dataset format and access the state data after simulation.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckStaticRangeBlockExample
EXAMPLETITLE: Check Signal Range with Check Static Range Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Check Static Range block, you can check if an input signal falls outside of an unchanging range of values.


COMPONENT: simulink
EXAMPLENAME: CreateSignalsUsingLiveEditorTaskForInputPortExample
EXAMPLETITLE: Create Signals Using Live Editor Task for Input Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Create Signal Live Editor task to create numerical data for an inport port in a model by drawing an arc. By default, Create Signal creates a variable named createdSignal in the workspace with a numerical signal type and outputs data in the timeseries format.


COMPONENT: simulink
EXAMPLENAME: StopSimulationWithRelationalOperatorExample
EXAMPLETITLE: Stop Simulation Block with Relational Operator Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Control when a simulation stops by using a Stop Simulation block with a Relational Operator block. When you simulate the model, the model stops simulation when the simulation time reaches 10.


COMPONENT: simulink
EXAMPLENAME: SineOfFloatingPointInputInTrigFunctionBlockExample
EXAMPLETITLE: sin Function with Floating-Point Input
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Trigonometric Function block to compute the sine of a floating-point input. The output of the Trigonometric Function block has the same data type as the input because the input data type is floating-point and the Approximation method is none .


COMPONENT: simulink
EXAMPLENAME: AccessSimulinkSimulationDataDataStoreMemoryObjectExample
EXAMPLETITLE: Access Simulink.SimulationData.DataStoreMemory Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The simpleDSM model contains a Data Store Memory block that defines and initializes the data store named A and is configured for logging. The model also contains a Sine Wave block connected to a Data Store Write block that writes to data store A. Data store logging is enabled for the model. When you simulate a model with logged data stores, the software saves data store data in one or more Simulink.SimulationData.DataStoreMemory objects.


COMPONENT: simulink
EXAMPLENAME: EnumeratedDataPortIndicesMultiportSwitchBlockExample
EXAMPLETITLE: Enumerated Names for Data Port Indices of the Multiport Switch Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The sldemo_fuelsys model uses a Multiport Switch block in the fuel_rate_control/fuel_calc/feedforward_fuel_rate subsystem. This block uses the enumerated type sld_FuelModes to specify three data port indices: LOW , RICH , and DISABLED .


COMPONENT: simulink
EXAMPLENAME: DisplayErrorsInDiagnosticViewerExample
EXAMPLETITLE: Display Errors in Diagnostic Viewer
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the sldiagviewer.reportSimulationMetadataDiagnostics function to display error and warning messages captured in a Simulink.SimulationOutput object using the Diagnostic Viewer.


COMPONENT: simulink
EXAMPLENAME: ReferenceAnotherModelExample
EXAMPLETITLE: Reference Another Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can include one model in another by using a Model block. Each Model block is a model reference , or a reference to another model. You can reference a model multiple times without making redundant copies, and multiple models can reference the same model.


COMPONENT: simulink
EXAMPLENAME: CreateReferencesToPersistentStorageDatasetObjectsExample
EXAMPLETITLE: Create References to Persistent Storage Dataset Objects
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can construct and use Simulink.SimulationData.DatasetRef objects to access data for a model that logs to persistent storage. This example shows the basic steps for logging to persistent storage. This example does not represent a realistic situation for logging to persistent storage because it shows a short simulation with small memory requirements.


COMPONENT: simulink
EXAMPLENAME: DataTypeInheritRulesAddBinaryPointScalingSingleWordExample
EXAMPLETITLE: Data Type Inheritance Rules for Add with Binary-Point Scaling When Ideal Type Is Single Word
PRODUCT: MATLAB;Simulink;Fixed-Point Designer
DESCRIPTION:
For this example, assume that both inputs to the sum block are single word and use binary-point scaling. The first input has a data type of ufix16_En6, meaning a 16-bit unsigned fixed-point type with a fraction length of 6. The second input has a data type of ufix16_En4, meaning a 16-bit unsigned fixed-point type with a fraction length of 4. See Fixed-Point Data in MATLAB and Simulink for more information on this notation.


COMPONENT: simulink
EXAMPLENAME: ParameterizeAReferencedModelExample
EXAMPLETITLE: Parameterize a Referenced Model Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Programmatically configure multiple instances of a referenced model to use different values for the same block parameter.


COMPONENT: simulink
EXAMPLENAME: OpenTheExampleModelAndLoadDictionaryDesignDataExample
EXAMPLETITLE: Open the Example Model and Load Design Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the example model ex_SystemModel . This model is at the top of a reference hierarchy that includes the other example models.


COMPONENT: simulink
EXAMPLENAME: CompareModelToRevisionExample
EXAMPLETITLE: Compare Model to Revision
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You assign a new hire a task to improve the readability of the mysimple_stats_block.slx model. The model is under Git™ source control.


COMPONENT: simulink
EXAMPLENAME: GetCompiledPortDimensionsExample
EXAMPLETITLE: Get Compiled Port Dimensions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
These examples show how to use the CompiledPortDimensions parameter to obtain dimensions of port signals of blocks in a Simulink model during compilation. For nonbus signals, dimensions of port signals represent dimensions of signals associated with the querying port. For buses, dimensions of port signals consist of the type of bus associated with the querying port, the number of signals carried by the bus, and the dimensions of those signals. To display signal dimensions, in the Simulink Editor, on the Debug tab, click Information Overlays > Signals >Signal Dimensions. For more information on signal dimensions, see Signal Dimensions.


COMPONENT: simulink
EXAMPLENAME: UsingVariableSizeSignalOnTheDelayBlockExample
EXAMPLETITLE: Using Variable-Size Signals on the Delay Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How the Delay block supports variable-size signals for sample-based processing. The Switch block controls whether the input signal to the enabled subsystem is a 3-by-3 or 3-by-2 matrix.


COMPONENT: simulink
EXAMPLENAME: GenerateUnitDiagAndIdentityMatricesExample
EXAMPLETITLE: Generate Unit-Diagonal and Identity Matrices
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Generate a 3-by-6 unit-diagonal matrix and a 5-by-5 identity matrix using the Identity Matrix block.


COMPONENT: simulink
EXAMPLENAME: MultiplyInputsOfDifferentDimensionsUsingProductBlockExample
EXAMPLETITLE: Multiply Inputs of Different Dimensions with the Product Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Perform element-wise (.*) multiplication of inputs using the Product block. In this example, the Product block multiplies two scalars, a scalar and a vector, and two 2x2 matrices.


COMPONENT: simulink
EXAMPLENAME: ConcatenateDatasetExample
EXAMPLETITLE: Concatenate Dataset to Another Dataset
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The vdp model logs data for the x1 and x2 signals. You can log additional signals using signal logging. Mark the signal coming from the Mu block for logging. Then, simulate the model.


COMPONENT: simulink
EXAMPLENAME: ConvertWorkspaceDataToDatasetExample
EXAMPLETITLE: Convert timeseries object to Dataset object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert data from timeseries format to Dataset format. The model vdpConvert is the vdp model with two To Workspace blocks that log data to variables named simout and simout1.


COMPONENT: simulink
EXAMPLENAME: RecoverDeletedComparisonResultsExample
EXAMPLETITLE: Retrieve Comparison Results in a Workspace Variable
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the Simulink.sdi.getCurrentComparison function or the Simulink.sdi.DiffRunResult.getResult function to retrieve the results for the most recent comparison if you accidentally delete the returned results from the workspace using the clear function.


COMPONENT: simulink
EXAMPLENAME: ChangeStateOfSwitchBlockUsingSliderSwitchBlockExample
EXAMPLETITLE: Change State of Switch Block Using Slider Switch Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Slider Switch block to change the state of a Switch block during simulation. The model sliderSwitch contains a Slider Switch block connected to a Constant block named Control Input. When the Slider Switch block is on, the value of the Control Input block is 1, and the Switch block outputs the value 5. When the Slider Switch block is off, the value of the Control Input block is 0, and the Switch block outputs a value of 0.


COMPONENT: simulink
EXAMPLENAME: SimplifyBusInterfacesExample
EXAMPLETITLE: Simplify Bus Interfaces in Subsystems and Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert a subsystem or model interface that uses Inport, Bus Selector, Bus Creator, and Outport blocks to use In Bus Element and Out Bus Element blocks.


COMPONENT: simulink
EXAMPLENAME: AnalyzePerformanceForSimulationModesExample
EXAMPLETITLE: Analyze Performance of Simulation Modes
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To see the effect of using accelerator or rapid accelerator mode for simulations of your model, you can run equivalent simulations using different simulation modes. Simulate the model in a way that returns the results as a single Simulink.SimulationOutput object that includes simulation metadata. That way, you can inspect the timing information captured in the simulation metadata for each simulation to analyze the performance of each simulation mode.


COMPONENT: simulink
EXAMPLENAME: ImplementPipeliningInSimulinkExample
EXAMPLETITLE: Implement Pipelining in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Implement pipelining for a system represented in a Simulink® model. The ex_task_parallelism_initial model consists of an input, functional components applied to the same input, and a concatenated output. This example shows how to break up data dependencies between the tasks so that they can run completely in parallel. For more information on pipelining, see Types of Parallelism.


COMPONENT: simulink
EXAMPLENAME: BasicMLFBSetupExample
EXAMPLETITLE: Open the Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model call_stats_block1 includes an empty MATLAB Function block and the blocks you need for the example. Open the model.


COMPONENT: simulink
EXAMPLENAME: CFunctionBlockForEachExample
EXAMPLETITLE: Use C Function Block Within For Each Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a C Function block within a For Each subsystem. The example passes a vector signal into the For Each subsystem, which repeats execution of the C Function block on each element of the input signal and concatenates the results. The C Function block calls the custom code function customSaturateFcn() , which implements a saturation algorithm and outputs a clipped version of the input signal. A C Caller block with the same settings can also be used in place of a C Function block in a For Each subsystem.


COMPONENT: simulink
EXAMPLENAME: LoadSimulationInputDataForAnArrayOfBusesExample
EXAMPLETITLE: Load Simulation Input Data for an Array of Buses
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Simulink.SimulationData.createStructOfTimeseries function to generate simulation input for an array of buses. You create timeseries data by simulating one model. Then, you create an input structure using the logged data to load into an array of buses in another model.


COMPONENT: simulink
EXAMPLENAME: LoadVarFromExcelForMultipleSimulationsExample
EXAMPLETITLE: Load Variables from Custom File Format for Multiple Simulations
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load variables into a Simulink.SimulationInput object from a custom file source, and run parallel simulations with those variables. To enable this, write and register an adapter. In this example, we use a model of a road suspension system. that we want to simulate with different sets of variables. The set of variables and their values for simulations is stored in the Excel files CompactAndMidsizeCar.xls and LargeCars.xls


COMPONENT: simulink
EXAMPLENAME: MLFBParameterVariableExample
EXAMPLETITLE: MATLAB Function Block Parameter Variable Example
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Uses a MATLAB Function block with a parameter variable. In this example, a variable in the base workspace defines the value of the parameter value.


COMPONENT: simulink
EXAMPLENAME: ConfigureSimulationUsingStructureConfigurationParametersExample
EXAMPLETITLE: Configure Simulation Using Structure of Configuration Parameters
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a structure of model configuration parameter names and values to configure a simulation of a model. The configuration parameter values in the structure are applied to the model for the simulation. After simulation, any model settings that changed are reverted to the original value.


COMPONENT: simulink
EXAMPLENAME: ForceAutomatedLayoutExample
EXAMPLETITLE: Force Automated Layout
PRODUCT: MATLAB;Simulink
DESCRIPTION:
By default, Simulink.BlockDiagram.arrangeSystem applies an automated layout only when the automated layout is expected to improve upon the original layout. You can force this function to apply the layout even when the automated layout might not improve upon the original layout.


COMPONENT: simulink
EXAMPLENAME: PlotDataFromSimulinksdiDatasetRefObjectExample
EXAMPLETITLE: Plot Data from Simulink.sdi.DatasetRef Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can plot data from a Simulation Data Inspector run referenced by a Simulink.sdi.DatasetRef object in the Simulation Data Inspector programmatically.


COMPONENT: simulink
EXAMPLENAME: SystemModelExample
EXAMPLETITLE: Open System Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The model is a flat robot that can move or rotate with the help of two wheels, similar to a home vacuuming robot. Open the model by entering in the MATLAB® command line:


COMPONENT: simulink
EXAMPLENAME: LoadAndSaveExternalInputsWithAppDesignerExample
EXAMPLETITLE: Load External Input and Save Simulation Output with App Designer
PRODUCT: MATLAB;Simulink
DESCRIPTION:
An app that provides an interface to load inputs for simulating a model, and then save the simulation output


COMPONENT: simulink
EXAMPLENAME: FromGotoAndGotoTagVisibilityBlockExample
EXAMPLETITLE: Signal Routing with the From, Goto, and Goto Tag Visibility Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the From, Goto, and Goto Tag Visibility blocks to route signals in your model. The GotoGlobal block at the top-level of the model has the Goto tag parameter set to G and the Tag visibility set to global . Thus, the G tag can be seen by From and Goto blocks at any level of the model hierarchy, except locations that span nonvirtual subsystem boundaries (like the Atomic Subsystem in this model). The From block at the top level of the model can see and connect to the global G tag, but cannot see or connect to the scoped S tag or L local tag that are specified on Goto blocks further down in the model hierarchy.


COMPONENT: simulink
EXAMPLENAME: MakeChangesAndMergeGitLocalBranchExample
EXAMPLETITLE: Make Changes and Merge Git Local Branch
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You are collaborating on models that are under Git™ source control. You work on some changes in your local branch taskBranch. When you attempt to merge your branch into the main branch, merge conflicts occur in two model files.


COMPONENT: simulink
EXAMPLENAME: CircuitLogicExample
EXAMPLETITLE: Circuit Logic
PRODUCT: MATLAB;Simulink
DESCRIPTION:
This sample circuit has three inputs: the two bits ( a and b ) to be summed and a carry-in bit ( c ). It has two outputs: the carry-out bit ( c' ) and the sum bit ( s ).


COMPONENT: simulink
EXAMPLENAME: EventsInScheduleEditorExample
EXAMPLETITLE: Schedule Partitions with Events
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
Use events to schedule the execution of aperiodic partitions via a Stateflow chart. You can send events from Stateflow and use those events to control the execution of the partitions in the model by using events in Schedule Editor.


COMPONENT: simulink
EXAMPLENAME: MessageListenerExample
EXAMPLETITLE: Connect Message Receive Interface with Simulink Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Synchronize execution with data availability in message-based systems. We show how to model this behavior using events and actions. This example builds on another example, Establish Message Send and Receive Interfaces Between Software Components, where two software components communicate using messages.


COMPONENT: simulink
EXAMPLENAME: GetBlockHandleExample
EXAMPLETITLE: Get Block Handle
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you want to make multiple function calls that require you to specify a block as an input argument, consider using block handles. This example shows how to get a block handle.


COMPONENT: simulink
EXAMPLENAME: UitimescopeVisualizeSignalDataDuringSimulationExample
EXAMPLETITLE: Plot Signal Data on Time Scope
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Visualize signal data in an app while a simulation runs by connecting a logged signal in a Simulink model to a time scope in an app.


COMPONENT: simulink
EXAMPLENAME: RequirementTraceabilityInSimulinkExample
EXAMPLETITLE: Highlight, Filter, and View Information for Links in a Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Work with a Simulink model that has links using the Requirements Viewer app. You can highlight links, view information about a link, and filter link highlighting based on specified keywords.


COMPONENT: simulink
EXAMPLENAME: RemoveScalingFromFixedPointSignalExample
EXAMPLETITLE: Remove Scaling from a Fixed-Point Signal
PRODUCT: Fixed-Point Designer;MATLAB;Simulink
DESCRIPTION:
Strip the scaling from a fixed-point input signal. To do so, the Data Type Scaling Strip block maps the input to the smallest built-in data type that has enough data bits to hold the input. The stored integer value of the input is the value of the output.


COMPONENT: simulink
EXAMPLENAME: ChangeStateOfSwitchBlockUsingToggleSwitchBlockExample
EXAMPLETITLE: Change State of Switch Block Using Toggle Switch Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Toggle Switch block to change the state of a Switch block during simulation. The model toggleSwitch contains a Toggle Switch block connected to the Value parameter of a Constant block named Control Input. When the Toggle Switch block is on, the value of the Control Input block is 1, and the Switch block outputs the value 5. When the Toggle Switch block is off, the value of the Control Input block is 0, and the Switch block outputs a value of 0.


COMPONENT: simulink
EXAMPLENAME: ConcatenateVectorsExample
EXAMPLETITLE: Concatenate Vectors
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A Vector Concatenate block concatenates the vectors it receives, placing them side-by-side in the output vector.


COMPONENT: simulink
EXAMPLENAME: FunctionAndFunctionCallerInSameModelExample
EXAMPLETITLE: Function and Function Caller in Same Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A parent model that contains one referenced model. The referenced model contains both a Function Caller block and a scoped Simulink Function block.


COMPONENT: simulink
EXAMPLENAME: RestoreAllSuppressedDiagnosticsExample
EXAMPLETITLE: Restore All Suppressed Diagnostics
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To restore all suppressed diagnostics associated with a model, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: ConfigureInstanceSpecificDataForLookupTablesExample
EXAMPLETITLE: Configure Instance-Specific Data for Lookup Tables Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you use Simulink.LookupTable objects to store and configure lookup table data for ASAP2 or AUTOSAR code generation (for example, STD_AXIS or CURVE), you can configure the objects as model arguments. You can then specify unique table data and breakpoint data for each instance of a component.


COMPONENT: simulink
EXAMPLENAME: AddDataToPlaybackBlockUsingSimulinkSimulationInputObjectExample
EXAMPLETITLE: Add Data to Playback Block Using Simulink.SimulationInput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A Simulink.SimulationInput object allows you to make changes to a model and run simulations with those changes. These changes are temporarily applied to the model.


COMPONENT: simulink
EXAMPLENAME: RepleteBlockExecutionForSpecifiedNumberOfTimesExample
EXAMPLETITLE: Repeat Block Execution for Specified Number of Times
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A subsystem that repeats execution during a simulation time step for a specified number of iterations.


COMPONENT: simulink
EXAMPLENAME: DirectLookupTableBlockTableDataInDialogBoxExample
EXAMPLETITLE: Specifying Table Data in the Direct Lookup Table Block Dialog Box
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Specify table data on the dialog box of the Direct Lookup Table (n-D) block. In the following model, the table data is a is a 4-D array of linearly increasing values that you define with the following model preload function:


COMPONENT: simulink
EXAMPLENAME: FunctionCallerBlockInReferencedModelExample
EXAMPLETITLE: Function Caller Block in Referenced Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A parent model that contains a Simulink Function block and a referenced model that contains a Function Caller block. To use this modeling pattern, the Function visibility parameter of the Trigger block in the Simulink Function block must be set to global .


COMPONENT: simulink
EXAMPLENAME: Read2DStructureFromWorkspaceBlockExample
EXAMPLETITLE: Read 2-D Signals in Structure Format From Workspace
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Read a 2-D structure from the MATLAB workspace. When you open the model, the following code is executed by a PreLoadFcn callback:


COMPONENT: simulink
EXAMPLENAME: CustomizeAppearanceOfBusElementPortBlocksExample
EXAMPLETITLE: Customize Appearance of In Bus Element and Out Bus Element Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use compact labels and block colors to customize the appearance of In Bus Element and Out Bus Element blocks.


COMPONENT: simulink
EXAMPLENAME: DisplaySignalValueUsingQuarterGaugeBlockExample
EXAMPLETITLE: Display Signal Value Using Quarter Gauge Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Quarter Gauge block to display the value of a connected signal on a quadrant scale during simulation. For example, in the model quarterGaugeSine, a Quarter Gauge block is connected to a sine wave signal named sinSig.


COMPONENT: simulink
EXAMPLENAME: MergeBlockWithUnequalInputWidthsExample
EXAMPLETITLE: Merge Block with Unequal Input Widths Example
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Merge block with inputs ports that have different widths. If you select Allow unequal port widths , the block accepts scalar and vector inputs having differing numbers of elements. You can specify an offset for each input signal relative to the beginning of the output signal. The width of the output signal is:


COMPONENT: simulink
EXAMPLENAME: SaveABusObjectExample
EXAMPLETITLE: Save Simulink.Bus Object Definitions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you create Simulink.Bus objects, save the Simulink.Bus object definitions for future use. To create functions that re-create the Simulink.Bus objects in the base workspace, use the Simulink.Bus.save function.


COMPONENT: simulink
EXAMPLENAME: DefineComparisonAndVisualizationPropertiesForASignalExample
EXAMPLETITLE: Define Comparison and Visualization Properties for a Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Obtain a Simulink.sdi.Signal object and modify its properties using the Simulation Data Inspector programmatic interface.


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckStaticLowerBoundBlockExample
EXAMPLETITLE: Check Signal Lower Bound with Check Static Lower Bound Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Check Static Lower Bound block, you can check if an input signal falls below a defined value.


COMPONENT: simulink
EXAMPLENAME: DetectRisingEdgeOfSignalsBlockExample
EXAMPLETITLE: Detect Rising Edge of Signals
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Detect the rising edge of a signal using the Detect Rise Nonnegative and Detect Rise Positive blocks.


COMPONENT: simulink
EXAMPLENAME: CreateArrayOfBusesAndExtractElementsExample
EXAMPLETITLE: Create Array of Buses from Nonvirtual Buses
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Vector Concatenate or Matrix Concatenate block to group nonvirtual buses into an array of buses. Simulink treats nonvirtual buses as scalars. Therefore, you can use either of these blocks regardless of the bus element data types.


COMPONENT: simulink
EXAMPLENAME: RunMultipleSimulationsThroughSimulinkExample
PRODUCT: MATLAB;Simulink
EXAMPLETITLE:
Multiple Simulations Panel: Simulate for Different Values of Stiffness for a Vehicle Dynamics System

DESCRIPTION:
Use the Multiple Simulations panel in the Simulink® Editor to run multiple simulations with varying values of stiffness of the suspension for a road profile that has a sinusoidal shape.


COMPONENT: simulink
EXAMPLENAME: TuneModelVariableWithSpinnerExample
EXAMPLETITLE: Tune Model Variable with Spinner
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Connect a spinner UI component to a model variable to tune the variable from an app while the simulation runs.


COMPONENT: simulink
EXAMPLENAME: CreateASimulinkSuppressedDiagnosticObjectExample
EXAMPLETITLE: Create a Simulink.SuppressedDiagnostic Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To create and then restore a diagnostic suppression, use getDiagnosticObjects.m , suppressor_script.m , and the Suppressor_CLI_Demo.slx model. The getDiagnosticObjects.m function queries the simulation metadata to access diagnostics that were thrown during simulation. The suppressor_script.m script contains the commands for suppressing and restoring diagnostics to the Suppressor_CLI_Demo model. Open the model. To access Simulink.SimulationMetadata class, set the ReturnWorkspaceOutputs parameter value to 'on' . Simulate the model.


COMPONENT: simulink
EXAMPLENAME: CheckProgressOfReadDataFromDatastoreExample
EXAMPLETITLE: Check Progress of Read Data from Datastore
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you have a matlab.io.datastore.SimulationDatastore object that contains big data from a simulation, you can use the read function to read chunks of data to incrementally process your data. The progress function returns the percentage of data that has been read from the datastore.


COMPONENT: simulink
EXAMPLENAME: AccessThePropertiesOfThisObjectExample
EXAMPLETITLE: Access and Change Properties of Object
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Access and change the properties of a Simulink.GlobalDataTransfer object. This example uses the model, slexMulticoreSolverExample.


COMPONENT: simulink
EXAMPLENAME: PartialWriteSignalsWithMergeBlockExample
EXAMPLETITLE: Merged Partial-Write Signals
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Suppose you want to initialize a vector and periodically update partial elements of the signal based on certain conditions or inputs. You can use a Merge block whose inputs are from two Function-Call Subsystem blocks. One subsystem provides the initialize task while the other subsystem provides a periodic-write task.


COMPONENT: simulink
EXAMPLENAME: SODefineBlockDialogTabsExample
EXAMPLETITLE: Define Block Dialog Tabs, Sections, and Order of Properties
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Customizes the block dialog box for the MultipleGroupsWithTabs MATLAB System block by specifying property display names and modifying the getPropertyGroupImpl method.


COMPONENT: simulink
EXAMPLENAME: LoadMessageDataIntoModelUsingPlaybackBlockExample
EXAMPLETITLE: Load Message Data into Model Using Playback Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you have data in a file, the workspace, or the Simulation Data Inspector, you can use the Playback block to load the data into your model as messages. To load input data as messages, specify the interpolation method of your signal as none. In Simulink®, a message is a modeling artifact that combines events with related data. For more information about messages, see Simulink Messages Overview.


COMPONENT: simulink
EXAMPLENAME: ComplexExponentialOutputFromTrigFunctionBlockExample
EXAMPLETITLE: Trigonometric Function Block Behavior for Complex Exponential Output
PRODUCT: Fixed-Point Designer;MATLAB;Simulink
DESCRIPTION:
Compares the complex exponential output for two different configurations of the Trigonometric Function block.


COMPONENT: simulink
EXAMPLENAME: SpecifyAWaveformWithTheRepeatingSequenceBlockExample
EXAMPLETITLE: Specify a Waveform with the Repeating Sequence Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How you specify a waveform with the Repeating Sequence block. In this model, the block defines the Time values parameter as [0:0.1:0.5] and the Output values parameter as [0 15 25 09 13 17] . The stop time of the simulation is 0.7 second.


COMPONENT: simulink
EXAMPLENAME: ConfigureTriggersInTheSimulationDataInspectorExample
EXAMPLETITLE: Programmatically Configure Triggers in the Simulation Data Inspector
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Add a trigger to a signal in the Simulation Data Inspector to specify criteria that determine when to update plots to display fresh data. Triggers can allow you to capture transient signal behavior and can help stabilize the display of periodic signals so you can take measurements.


COMPONENT: simulink
EXAMPLENAME: AddBranchedLineExample
EXAMPLETITLE: Add Branched Line
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can programmatically make a connection that branches an existing signal line. You can use the points syntax to draw the segment, or you can draw the line by specifying the ports to connect. When using the ports, use automatic line routing to improve the layout of the branched line.


COMPONENT: simulink
EXAMPLENAME: DeleteBlockUsingFullPathNameExample
EXAMPLETITLE: Delete Blocks Using Full Path Name
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can programmatically delete a block from the library using the delete_block function with one of these input arguments:


COMPONENT: simulink
EXAMPLENAME: FixedPointDataTypeSupportGroundBlockExample
EXAMPLETITLE: Fixed-Point Data Type Support in the Ground Block
PRODUCT: Fixed-Point Designer;MATLAB;Simulink
DESCRIPTION:
Use the Ground block to ground block input ports that have fixed-point data types. The top row of this example illustrates the Ground block behavior when the fixed-point data type can represent zero. In that case, the Ground block outputs a signal with zero value, and the same fixed-point data type as the port it is connected to.


COMPONENT: simulink
EXAMPLENAME: AccessDataFromAParallelSimulationExample
EXAMPLETITLE: Access Data from Parallel Simulation
PRODUCT: Parallel Computing Toolbox;MATLAB;Simulink
DESCRIPTION:
Execute parallel simulations of the model slexAircraftExample with different input filter time constants and access the data in different ways using the Simulation Data Inspector programmatic interface.


COMPONENT: simulink
EXAMPLENAME: LoadVariablesFromMATFileExample
EXAMPLETITLE: Load Variables from MAT File into Simulink.SimulationInput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load variables from a MAT file into a Simulink.SimulationInput object using the loadVariablesFromMATFile function.


COMPONENT: simulink
EXAMPLENAME: DifferenceSineWaveSignalExample
EXAMPLETITLE: Difference Sine Wave Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Calculate the difference in a sine wave signal at each time step. The input is a 1-by-2 vector of sine waves, with amplitude 1 and 3. The difference block calculates the difference in each sine wave signal at every time step. The Scope block displays both the original sine waves and the output of the difference block.


COMPONENT: simulink
EXAMPLENAME: DuplicateAnInportBlockInASubsystemExample
EXAMPLETITLE: Duplicate Inport Block in Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Add an Inport block in the f14/Controller subsystem that uses the same port number as another Inport block in that subsystem.


COMPONENT: simulink
EXAMPLENAME: CompareASubsetOfSignalsExample
EXAMPLETITLE: Compare a Subset of Signals
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Simulink.sdi.copyRun and Simulink.sdi.deleteSignal to create a copy of a run that contains a subset of the signals from the original run. You can use the copy to analyze and run comparisons on a subset of signals while still holding onto the original run that has all of the signals. For example, the model sldemo_fuelsys is configured to log ten signals. To compare the system's responses to different types of failures, you don't need to run the comparison on all of the logged signals. Deleting signals that do not represent the system's response before running the comparison saves processing time and simplifies the view of the results.


COMPONENT: simulink
EXAMPLENAME: FindIndexOfSignalInModelLoggingOverrideObjectExample
EXAMPLETITLE: Find Index of Signal in Model Logging Override Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the findSignal function to find the index of a signal in a model logging override object. This example uses the model sldemo_mdlref_bus which logs four signals. Three of the logged signals are located in the top model. The fourth signal is located in the referenced model sldemo_mdlref_counter_bus.


COMPONENT: simulink
EXAMPLENAME: ConvertDataTypesInSimulinkBlockExample
EXAMPLETITLE: Convert Data Types in Simulink Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Three different methods of converting data types in your model using the Data Type Conversion and Data Type Conversion Inherited blocks. In this model, a Sine Wave block generates the input signal. The Sine Wave block only outputs double-precision data types, so to generate a sine wave with a data type of single, you must perform a data type conversion.


COMPONENT: simulink
EXAMPLENAME: ConfigureLocalSolverForComponentWithFastDynamicsExample
EXAMPLETITLE: Configure Local Solver for Component with Fast Dynamics
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model SecondOrderSystemTop. The model contains a Ramp block that provides the input signal for a Model block that references a model of a second-order system. The Model block output signal connects to an Outport block.


COMPONENT: simulink
EXAMPLENAME: UsingTheSaturationBlockInSLBoilerExample
EXAMPLETITLE: Using the Quantizer and Saturation blocks in sldemo_boiler
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How the Quantizer and Saturation blocks are used in the model ex_sldemo_boiler. The ADC subsystem digitizes the input analog voltage by:


COMPONENT: simulink
EXAMPLENAME: CheckSignalAmplitudeWithCheckDynamicUpperBoundBlockExample
EXAMPLETITLE: Check Signal Upper Bound with Check Dynamic Upper Bound Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Using the Check Dynamic Upper Bound block, you can check if an input signal rises above a changing upper bound during a simulation.


COMPONENT: simulink
EXAMPLENAME: GetComparisonResultsForNonscalarSignalByNameExample
EXAMPLETITLE: Get Comparison Results for Nonscalar Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Load the Simulation Data Inspector session file getResultsByNameData. The file contains data logged from two simulations of the model getResultsByNameModel, which logs data for five signals, including two multidimensional signals: SmallMux and LargeMux.


COMPONENT: simulink
EXAMPLENAME: CreateInputBusElementPortExample
EXAMPLETITLE: Create Input Bus Element Port
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In a model component, each input bus element port is represented by one or more In Bus Element blocks.


COMPONENT: simulink
EXAMPLENAME: MessagePatternsWithSimEventsExample
EXAMPLETITLE: Modeling Message Communication Patterns with SimEvents
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create common communication patterns using SimEvents®. In message-based communication models, you can use SimEvents® to model and simulate middleware, and investigate the effects of communication and the environment on your distributed architecture.


COMPONENT: simulink
EXAMPLENAME: ChangeGainUsingRotarySwitchBlockExample
EXAMPLETITLE: Change Gain Value Using Rotary Switch Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Rotary Switch block to set the value of a parameter to one of several values during simulation. For example, in the model rotaryGain, a Rotary Switch block is connected to the Gain parameter of a Gain block. The Rotary Switch block is configured such that you can choose a gain value of 0, 5, 10, or 15.


COMPONENT: simulink
EXAMPLENAME: ViewBacklashOutputOnSineWaveExample
EXAMPLETITLE: View Backlash Output on Sine Wave
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The effect of the Backlash block on a sine wave using default parameters. The initial Deadband width is 1 and the Initial output is 0 .


COMPONENT: simulink
EXAMPLENAME: FindMinimumValuesForSignalsInBusExample
EXAMPLETITLE: Find Minimum Values for Signals in Bus
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Open the model named BusHierarchy. The model groups the output signals from a Chirp block and a Sine block into a bus that is nested in another bus. The top-level bus also contains the output signal from a Step block. To update the bus line styles, on the Modeling tab of the Simulink Toolstrip, click Update Model or Run.


COMPONENT: simulink
EXAMPLENAME: TargetIllustrationMATLABSimulinkExample
EXAMPLETITLE: Convert Moving Target MATLAB Code to a Simulink Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert MATLAB® algorithms into a Simulink® model using a moving target example. The conversion allows you to build models that contain MATLAB and Simulink components. This example uses MATLAB code for target creation and deletion then shows you how to convert that functionality into Simulink.


COMPONENT: simulink
EXAMPLENAME: ViewTheContentsOfTheSimulinkSimulationInputObjectExample
EXAMPLETITLE: View Contents of Simulink.SimulationInput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the showContents function to view the simulation configuration stored in a Simulink.SimulationInput object.


COMPONENT: simulink
EXAMPLENAME: FunctionCallFeedbackLatchWithSplitBlockExample
EXAMPLETITLE: Function-Call Blocks Connected to Branches of the Same Function-Call Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In this model, a Function-Call Feedback Latch block is on the feedback signal between the branched blocks.


COMPONENT: simulink
EXAMPLENAME: DisplaySignalValueUsingLinearGaugeBlockExample
EXAMPLETITLE: Display Signal Value Using Linear Gauge Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use a Linear Gauge block to display a connected signal on a straight, linear scale during simulation. For example, in the model linearGaugeSine, a Linear Gauge block is connected to a sine wave signal named sinSig.


COMPONENT: simulink
EXAMPLENAME: CaptureMeasurementDescriptionsInDocBlockExample
EXAMPLETITLE: Capture Measurement Descriptions in a DocBlock
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a DocBlock to capture information about a model. In the sldemo_fuelsys model, a DocBlock labeled Sensor Info is used to document measurement descriptions inside of the To Controller subsystem.


COMPONENT: simulink
EXAMPLENAME: DetectDecreasingSignalValuesBlockExample
EXAMPLETITLE: Detect Decreasing Signal Values
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Determine if an input signal is strictly less than its previous value using the Detect Decrease block. When the current input to the Detect Decrease block is less than its previous value, the block outputs one (true). When the current input is greater than or equal to the previous signal value, the Detect Decrease block outputs zero (false).


COMPONENT: simulink
EXAMPLENAME: GetRunIDForASimulationExample
EXAMPLETITLE: Get Simulation Data Inspector Run IDs
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Many tasks performed using the Simulation Data Inspector programmatic interface start with obtaining the run ID for a simulation run. This example illustrates several methods to get the run ID for a run. You can use the run ID to access the Simulink.sdi.Run object that contains the run data and metadata and perform run comparisons using the Simulink.sdi.compareRuns function.


COMPONENT: simulink
EXAMPLENAME: LogTopLevelAndReferencedModelsAsSpecifiedInModelExample
EXAMPLETITLE: Log Top-Level and Referenced Models as Specified in Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can control whether a top-level model and referenced models use override signal logging settings or use the signal logging settings specified by the model. This example shows how to log all signals as specified in the top model and all referenced models.


COMPONENT: simulink
EXAMPLENAME: ManuallyImportPCTRunsIntoSDIExample
EXAMPLETITLE: Manually Send Runs from Parallel Workers to the Simulation Data Inspector
PRODUCT: Parallel Computing Toolbox;MATLAB;Simulink
DESCRIPTION:
Use Simulink.sdi.sendWorkerRunToClient to send runs created using parallel workers manually to the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: InspectDataInSimulationDatastoreExample
EXAMPLETITLE: Inspect and Analyze SimulationDatastore Object Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can log big data from a simulation and inspect and analyze portions of that data by interacting with a matlab.io.datastore.SimulationDatastore object.


COMPONENT: simulink
EXAMPLENAME: TunePhaseDelayOnPulseGeneratorDuringSimulationExample
EXAMPLETITLE: Tune Phase Delay on Pulse Generator During Simulation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Modify a model so that you can change a phase delay for a Pulse Generation block during simulation. You cannot tune the value of the Phase delay parameter during simulation. As a workaround, add a Constant block and a Variable Time Delay block.


COMPONENT: simulink
EXAMPLENAME: VariableSpeedConveyorBeltExample
EXAMPLETITLE: Modeling Cyber-Physical Systems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Cyber-physical systems combine computer and physical systems to achieve design goals. Simulation of cyber-physical systems requires a combination of modeling techniques such as continuous-time, discrete-time, discrete-event, and finite state modeling. Simulink® and its companion products provide functionality to apply a wide range of modeling techniques and seamlessly integrate them in one simulation environment, which is ideal for modeling cyber-physical systems.


COMPONENT: simulink
EXAMPLENAME: ModifyContentsOfSimulinkSimulationOutputObjectExample
EXAMPLETITLE: Modify Contents of Simulink.SimulationOutput Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A Simulink.SimulationOutput object represents the result of a simulation. The SimulationOutput object contains simulation metadata and all data logged from simulation. You can modify the contents of a Simulink.SimulationOutput object by adding or removing data logging and custom properties.


COMPONENT: simulink
EXAMPLENAME: SpecifyStartAndStopTimeForSimulationExample
EXAMPLETITLE: Specify Start and Stop Time for Simulation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To change the start and stop time for a simulation without modifying configuration parameter values saved in a model, use a Simulink.SimulationInput object.


COMPONENT: simulink
EXAMPLENAME: SaveADatasetToAMATFileToLoadInAPriorReleaseExample
EXAMPLETITLE: Save a Dataset to a MAT-File to Load in a Prior Release
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use the exportToPreviousRelease function to save data stored in a Simulink.SimulationData.Dataset object in a MAT-file that you can load in a previous release. This example saves data logged from a simulation in a MAT-file using the exportToPreviousRelease function, and then appends another Dataset object containing data logged from another simulation to the same MAT-file.


COMPONENT: simulink
EXAMPLENAME: ExploreTheModelForSinglePrecisionValidationExample
EXAMPLETITLE: Explore the Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Uses the ex_single_validation model to show how you can use data type override. It proves that an algorithm, which implements double-precision data types, is also suitable for single-precision embedded use.


COMPONENT: simulink
EXAMPLENAME: EnumsInMATLABFunctionBlockExample
EXAMPLETITLE: Enumerations in a MATLAB Function Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How MATLAB Function blocks exchange enumerated data with other Simulink blocks. The model uses enumerations to represent the modes of a device that controls the colors of an LED display. The MATLAB Function block receives an enumerated input signal that represents the mode. The enumerated output signal represents the color that the LED displays.


COMPONENT: simulink
EXAMPLENAME: ProgrammaticallySpecifyInputProcessingSettingExample
EXAMPLETITLE: Programmatically Specify Input Processing Setting to Log a Frame-Based Signal
PRODUCT: MATLAB;Simulink;DSP System Toolbox
DESCRIPTION:
Many signal processing applications process data using frames, rather than individual signal values. A frame consists of signal values for several sample times. To process signals as frame-based in your model, specify frame-based processing in the blocks. To log and visualize frame-based signals, set the Input Processing setting to Columns as channels (frame based) in the Instrumentation Properties for the signal.


COMPONENT: simulink
EXAMPLENAME: LoadDataAsContinuousSignalExample
EXAMPLETITLE: Load Data as Continuous Signal
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A continuous signal has a value at any time point. When the loading block has constant (0) sample time, the block executes and provides an output value for the continuous signal for every time step in the simulation. To load input data as a continuous signal, use a data format that includes time values and use linear interpolation.


COMPONENT: simulink
EXAMPLENAME: DivideInputsOfDifferentDimensionsUsingDivideBlockExample
EXAMPLETITLE: Divide Inputs of Different Dimensions Using the Divide Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Perform element-wise (.*) division of two inputs using the Divide block. In this example, the Divide block divides two scalars, a vector by a scalar, a scalar by a vector, and two matrices.


COMPONENT: simulink
EXAMPLENAME: VoltageControlledOscillatorExample
EXAMPLETITLE: Voltage Controlled Oscillator
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model an ideal voltage controlled oscillator using the Variable Pulse Generator block to create the frequency oscillations.


COMPONENT: simulink
EXAMPLENAME: ConvertVirtualBusToNonvirtualBusExample
EXAMPLETITLE: Convert Virtual Bus to Nonvirtual Bus
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can convert a virtual bus to a nonvirtual bus anywhere within a model by using a docid:simulink_ref#f8-2452800 block.


COMPONENT: simulink
EXAMPLENAME: VisualizeSimulationDataOnAnXYPlotExample
EXAMPLETITLE: Visualize Simulation Data on XY Plot
PRODUCT: MATLAB;Simulink
DESCRIPTION:
View and inspect simulation data using the XY visualization and replay controls in the Simulation Data Inspector.


COMPONENT: simulink
EXAMPLENAME: AlternatelyExecutingEnabledSubsystemBlocksExample
EXAMPLETITLE: Alternately Executing Enabled Subsystem Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can use conditional subsystems with Merge blocks to create sets of subsystems that execute alternately, depending on the current state of the model.


COMPONENT: simulink
EXAMPLENAME: ConstructComplexSignalFromRealAndImaginaryPartsBlockExample
EXAMPLETITLE: Construct Complex Signal from Real and Imaginary Parts
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Real-Imag to Complex block to construct a complex-valued signal from real and imaginary parts. You can provide both the real and imaginary parts as block inputs, or provide one value as an input, and the other on the block dialog box.


COMPONENT: simulink
EXAMPLENAME: FiniteStateMachineWithCombinatorialLogicMemoryBlocksExample
EXAMPLETITLE: Implement a Finite-State Machine with the Combinatorial Logic and Memory Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The sldemo_clutch example shows how you can use the Memory block with the Combinatorial Logic block to implement a finite-state machine.


COMPONENT: simulink
EXAMPLENAME: RunSetOfSimulationsUsingFastRestartExample
EXAMPLETITLE: Run Set of Simulations Using Fast Restart
PRODUCT: MATLAB;Simulink
DESCRIPTION:
When you use an array of Simulink.SimulationInput objects to configure a set of simulations, you can use a single call to the sim function to run the set of simulations using fast restart. Fast restart saves time in simulation by keeping the model compiled between simulation runs.


COMPONENT: simulink
EXAMPLENAME: IntAndEnumDataTypeSupportGroundBlockExample
EXAMPLETITLE: Integer and Enumerated Data Type Support in the Ground Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Ground block to ground block input ports that have integer and enumerated data types. In top row of this example, the output of the Constant block determines the data type ( int8 ) of the port to which the Ground block is connected. That port determines the output data type of the Ground block, and the Ground block outputs a signal with zero value, and data type int8 .


COMPONENT: simulink
EXAMPLENAME: CreateModelLoggingInfoObjectWithLoggedSigngalsExample
EXAMPLETITLE: Create Model Logging Override Object with Logged Signals
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can create a model logging override object for the model sldemo_mdlref_bus and automatically add each logged signal in the model to that object. The model sldemo_mdlref_bus has four signals marked for logging.


COMPONENT: simulink
EXAMPLENAME: SincosOfFixedPointInputTrigFunctionBlockExample
EXAMPLETITLE: sincos Function with Fixed-Point Input
PRODUCT: Fixed-Point Designer;MATLAB;Simulink
DESCRIPTION:
Use the Trigonometric Function block to compute the CORDIC approximation of sincos for a fixed-point input signal.


COMPONENT: simulink
EXAMPLENAME: ConvertStructureToDatasetObjectExample
EXAMPLETITLE: Convert Structure to Dataset Object
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert a structure to Dataset format. The model vdpConvertStructure is the vdp model with two To Workspace blocks that log data to variables named simout and simout1 in structure format.


COMPONENT: simulink
EXAMPLENAME: IntegratePythonFunctionWithinClassesUsingPythonImporterExample
EXAMPLETITLE: Integrate Python Functions Specified Within Classes Using Python Importer
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Python® Importer to import Python functions specified within modules that contain class and function definitions that parse NMEA GPS messages into Simulink®.


COMPONENT: simulink
EXAMPLENAME: UseConnectorsToVisualizeConnectionsBetweenModelBlocksExample
EXAMPLETITLE: Use Connectors Tool to Visualize Connections Between Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Connectors tool to visualize the connections between blocks. This visualization further helps to debug a model.


COMPONENT: simulink_aerospace
EXAMPLENAME: DesigningAGuidanceSystemInMATLABAndSimulinkExample
EXAMPLETITLE: Design a Guidance System in MATLAB and Simulink
PRODUCT: MATLAB;Simulink;Stateflow;Aerospace Blockset
DESCRIPTION:
Use the model of the missile airframe presented in a number of published papers on the use of advanced control methods applied to missile autopilot design. See [1], [2], and [3]. The model represents a tail-controlled missile traveling between Mach 2 and Mach 4, at altitudes ranging between 10,000 ft (3,050 m) and 60,000 ft (18,290 m), with typical angles of attack ranging between +/- 20 degrees.


COMPONENT: simulink_aerospace
EXAMPLENAME: DesigningAHighAngleOfAttackPitchModeControlExample
EXAMPLETITLE: Designing a High Angle of Attack Pitch Mode Control
PRODUCT: MATLAB;Control System Toolbox;Simulink;Simulink Control Design
DESCRIPTION:
Use the Control System Toolbox™ and Simulink® Control Design™ to interact with Simulink to design a digital pitch control for the aircraft. In this example, we will design the controller to permit the aircraft to operate at a high angle of attack with minimal pilot workload.


COMPONENT: simulink_aerospace
EXAMPLENAME: SimulinkModelDiscretizerExample
EXAMPLETITLE: Simulink Model Discretizer
PRODUCT: MATLAB;Control System Toolbox;Simulink
DESCRIPTION:
This interactive example shows how to discretize the Actuator Model in the slexAircraftExample model.


COMPONENT: simulink_aerospace
EXAMPLENAME: AircraftLongitudinalFlightControlExample
EXAMPLETITLE: Aircraft Longitudinal Flight Control
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model flight control for the longitudinal motion of an aircraft using first-order linear approximations.


COMPONENT: simulink_aerospace
EXAMPLENAME: OpticalSensorImageGenerationExample
EXAMPLETITLE: Optical Sensor Image Generation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Generate a movie with 64 frames and a frame size of 64 by 64 pixels (at 10 frames per second). The movie contains a simulation of a moving target that is moving through a structured background that is itself moving. A jitter motion caused by random vibration is also generated (in a Simulink® model called "aero_vibrati") and the jitter motion is added into the overall sensor motion. Finally, the image is blurred through a Gaussian optical point spread function.


COMPONENT: simulink_aerospace
EXAMPLENAME: SixDegreesOfFreedom6DoFMotionPlatformExample
EXAMPLETITLE: Six Degrees of Freedom (6-DoF) Motion Platform
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model six degrees of freedom motion in Simulink®. You can switch between using Euler Angles and Quaternions to model the equations of motion, using the Variant Subsystem block's "Variant > Override using" context menu.


COMPONENT: simulink_aerospace
EXAMPLENAME: RadarTrackingUsingMATLABFunctionBlockExample
EXAMPLETITLE: Radar Tracking Using MATLAB Function Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a Kalman filter that estimates the position of an aircraft by using a MATLAB Function block. After estimating the position, the model calls an external MATLAB® function to plot the tracking data.


COMPONENT: simulink_automotive
EXAMPLENAME: BuildingAClutchLockUpModelExample
EXAMPLETITLE: Building a Clutch Lock-Up Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Simulink® to model and simulate a rotating clutch system. Although modeling a clutch system is difficult because of topological changes in the system dynamics during lockup, this example shows how enabled subsystem can easily handle such problems. We illustrate how to employ important Simulink modeling concepts in the creation of the clutch simulation. Designers can apply these concepts to many models with strong discontinuities and constraints that may change dynamically.


COMPONENT: simulink_automotive
EXAMPLENAME: AutomotiveSuspensionExample
EXAMPLETITLE: Automotive Suspension
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a simplified half-car model that includes an independent front and rear vertical suspension. The model also includes body pitch and bounce degrees of freedom. The example provides a description of the model to show how simulation can be used to investigate ride characteristics. You can use this model in conjunction with a powertrain simulation to investigate longitudinal shuffle resulting from changes in throttle setting.


COMPONENT: simulink_automotive
EXAMPLENAME: ModelingClutchLockUpUsingIfBlocksExample
EXAMPLETITLE: Modeling Clutch Lock-Up Using If Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use If/Else subsystems to build a clutch model. An 'If' subsystem models the clutch dynamics in the locked position while an 'Else' subsystem models the unlocked position. One or the other is enabled using the 'If' block. The dot-dashed lines from the 'If' block denote control signals, which are used to enable If/Else (or other conditional) subsystems. Checking any of the boxes on the GUI produces a plot of any of the selected variables (versus time).


COMPONENT: simulink_automotive
EXAMPLENAME: UseDDForFuelContSysExample
EXAMPLETITLE: Using a Data Dictionary to Manage the Data for a Fuel Control System
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
Use data dictionaries to manage the data for a fuel rate control system designed using Simulink® and Stateflow®.


COMPONENT: simulink_automotive
EXAMPLENAME: EngineTimingModelWithClosedLoopControlExample
EXAMPLETITLE: Engine Timing Model with Closed Loop Control
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Enhance a version of the open-loop engine model described in Model Engine Timing Using Triggered Subsystems. This model, sldemo_enginewc , contains a closed-loop and shows the flexibility and extensibility of Simulink® models. In this enhanced model, the objective of the controller is to regulate engine speed with a fast throttle actuator, such that changes in load torque have minimal effect. This is easily accomplished in Simulink by adding a discrete-time PI controller to the engine model.


COMPONENT: simulink_automotive
EXAMPLENAME: ModelingEngineTimingUsingTriggeredSubsystemsExample
EXAMPLETITLE: Model Engine Timing Using Triggered Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a four-cylinder spark ignition internal combustion engine from the throttle to the crankshaft output using triggered subsystems. In this example, the sldemo_engine model is based on [1].


COMPONENT: simulink_automotive
EXAMPLENAME: AnalyzeDataFromMultipleSimulationsExample
EXAMPLETITLE: Open and Simulate the Model
PRODUCT: MATLAB
DESCRIPTION:
Open the model sldemo_autotrans, which models a controller for an automatic transmission system. The model uses a Signal Editor block to load external input data to model the Throttle and Brake signals for different vehicle maneuvers. In this example, you run several simulations and analyze the system response to different vehicle maneuvers. For more information about the model and the system it represents, see docid:simulink_ref#example-sldemo_autotrans.


COMPONENT: simulink_automotive
EXAMPLENAME: ModelingAFaultTolerantFuelControlSystemExample
EXAMPLETITLE: Model a Fault-Tolerant Fuel Control System
PRODUCT: MATLAB;Stateflow;Simulink
DESCRIPTION:
Combine Stateflow® with Simulink® to efficiently model hybrid systems. This type of modeling is particularly useful for systems that have numerous possible operational modes based on discrete events. Traditional signal flow is handled in Simulink while changes in control configuration are implemented in Stateflow. The model described below represents a fuel control system for a gasoline engine. The system is highly robust in that individual sensor failures are detected and the control system is dynamically reconfigured for uninterrupted operation.


COMPONENT: simulink_automotive
EXAMPLENAME: ModelingAnAutomaticTransmissionControllerExample
EXAMPLETITLE: Model an Automatic Transmission Controller
PRODUCT: Simulink;Stateflow
DESCRIPTION:
Model an automotive drivetrain with Simulink®. Stateflow® enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful environment for the modeling and simulation of dynamic systems and processes. In many systems, though, supervisory functions like changing modes or invoking new gain schedules must respond to events that may occur and conditions that develop over time. As a result, the environment requires a language capable of managing these multiple modes and developing conditions. In the following example, Stateflow shows its strength in this capacity by performing the function of gear selection in an automatic transmission. This function is combined with the drivetrain dynamics in a natural and intuitive manner by incorporating a Stateflow block in the Simulink block diagram.


COMPONENT: simulink_automotive
EXAMPLENAME: VehicleElectricalAndClimateControlSystemsExample
EXAMPLETITLE: Vehicle Electrical and Climate Control Systems
PRODUCT: Simscape Electrical;Stateflow;Simulink
DESCRIPTION:
Model a vehicle climate control system with an electrical system. Use the model to examine the loading effects of the climate control system on the entire vehicle electrical system.


COMPONENT: simulink_automotive
EXAMPLENAME: ModelingAnAntiLockBrakingSystemExample
EXAMPLETITLE: Model an Anti-Lock Braking System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a simple Anti-Lock Braking System (ABS). The model simulates the dynamic behavior of a vehicle under hard braking conditions. The model represents a single wheel, which may be replicated a number of times to create a model for a multi-wheel vehicle.


COMPONENT: simulink_diagnostic
EXAMPLENAME: CreateStageToDisplayDiagnosticMessagesExample
EXAMPLETITLE: Create Stage to Display Diagnostic Messages
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a stage to display diagnostic messages in the Diagnostic Viewer using sldiagviewer.createStage.


COMPONENT: simulink_features
EXAMPLENAME: MonitoringInkStatusOnASharedPrinterExample
EXAMPLETITLE: Monitor Ink Status on Shared Printer Using Simulink Functions
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
How multiple clients can send requests to a server and receive a status from the server. Using Simulink® functions, different subsystems can call functions from other subsystems and interact in Simulink and Stateflow®. In this example, you model the ink status monitoring of a shared printer using Simulink functions.


COMPONENT: simulink_features
EXAMPLENAME: MergingSignalsExample
EXAMPLETITLE: Merging Signals
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use conditionally executed subsystems and the Merge block to combine two inputs into a single output.


COMPONENT: simulink_features
EXAMPLENAME: EnabledSubsystemsExample
EXAMPLETITLE: Enabled Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
What happens when a sine wave is fed into an enabled subsystem. After running the simulation, the scope shows three plots.


COMPONENT: simulink_features
EXAMPLENAME: DynamicPrioritySchedulingOfFunctionsExample
EXAMPLETITLE: Dynamic Priority Scheduling of Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A common modeling pattern to dynamically schedule the execution of functions using a Stateflow® chart.


COMPONENT: simulink_features
EXAMPLENAME: InputsPassedByValueOrAddressToLegacyFunctionsExample
EXAMPLETITLE: Inputs Passed by Value or Address to Legacy Functions
PRODUCT: MATLAB
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that pass their input arguments by value versus address.


COMPONENT: simulink_features
EXAMPLENAME: UsingDataStoresAcrossMultipleModelsExample
EXAMPLETITLE: Use Data Stores Across Multiple Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model showing how to define, use, and log global data stores to share global data among referenced models.


COMPONENT: simulink_features
EXAMPLENAME: AttachDataToExtInputsViaCustomInpMapExample
EXAMPLETITLE: Attaching Input Data to External Inputs via Custom Input Mappings
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a custom mapping function for the Root Inport Mapper tool. The Root Inport Mapper tool associates MAT-file data with a specific input port, based on one of these criteria.


COMPONENT: simulink_features
EXAMPLENAME: LookupTablesImplementedInLegacyFunctionsExample
EXAMPLETITLE: Lookup Tables Implemented in Legacy Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that implement N-dimensional table lookups.


COMPONENT: simulink_features
EXAMPLENAME: ParsimParamSwpInRapidAcceleratorModeExample
EXAMPLETITLE: Parallel Simulations Using Parsim: Parameter Sweep in Rapid Accelerator Mode
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink
DESCRIPTION:
Run multiple simulations of a Monte Carlo study in parallel by using Parallel Computing Toolbox™. Parallel execution leverages the multiple cores of your host machine to run many simulations more quickly. These simulations could also be run in parallel on computer clusters using the MATLAB Parallel Server™. This example will work even if the Parallel Computing Toolbox™ or the MATLAB Parallel Server™ is not available, but the simulations will run in serial.


COMPONENT: simulink_features
EXAMPLENAME: FixedPointSignalsInLegacyFunctionsExample
EXAMPLETITLE: Fixed Point Signals in Legacy Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that pass their inputs and outputs using signals of fixed point data type.


COMPONENT: simulink_features
EXAMPLENAME: PulseWidthModulationUsingMATLABSystemBlockExample
EXAMPLETITLE: Pulse Width Modulation Using MATLAB System Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use MATLAB System block to generate Pulse Width Modulation (PWM) signals based on the input period and duty cycle signals by using controllable sample time and setNumTicksUntilNextHit.


COMPONENT: simulink_features
EXAMPLENAME: ConvertingHarnessDrivenModelsToUseHarnessExample
EXAMPLETITLE: Create Harness-Free Models with MAT File Input Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Map MAT file data to the root-level input ports, which creates a harness-free model. Using root-level input ports can speed up simulation time. In the example, you convert a model with a Signal Editor input block to a harness-free model with root-level input ports. The harness-free model uses the data from the Signal Editor block MAT file.


COMPONENT: simulink_features
EXAMPLENAME: MultipleSimulationsWorkflowTipsExample
EXAMPLETITLE: Multiple Simulations Workflow Tips
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink
DESCRIPTION:
The goal of this example is to provide helpful tips for running multiple simulations using parallel simulation tools. This example will work even if the Parallel Computing Toolbox™ is not available, but the simulations will run in serial. We will be using the model sldemo_suspn_3dof .


COMPONENT: simulink_features
EXAMPLENAME: SimulinkBusSignalsExample
EXAMPLETITLE: Explore Simulink Bus Capabilities
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Work with buses in components, use bus ports at component interfaces, and perform common bus workflows faster.


COMPONENT: simulink_features
EXAMPLENAME: BringCustomImageFilterAlgSlExample
EXAMPLETITLE: Use Custom Image Filter Algorithms as Reusable Blocks in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Incorporate image filter algorithms written in C code into a model using C Caller blocks in a reusable Simulink® library.


COMPONENT: simulink_features
EXAMPLENAME: SpecifiedOrInheritedSampleTimeWithLegacyFunctionsExample
EXAMPLETITLE: Specified or Inherited Sample Time with Legacy Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions with the sample time specified, inherited and parameterized.


COMPONENT: simulink_features
EXAMPLENAME: VariableSizeSignalBasicOperationsExample
EXAMPLETITLE: Bounded Variable-Size Signal Basic Operations
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
How bounded variable-size signals can be generated and illustrates some of the operations using those signals. In this example, variable-size signals are generated using Selector block and Switch block. The signals are used in math operations, bus creation, bus selection matrix concatenation, and to implement a discrete filter equation.


COMPONENT: simulink_features
EXAMPLENAME: SavingAndRestoringSimulationOperatingPointExample
EXAMPLETITLE: Specify Initial State for Simulation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulate a model from an initial state using final states data saved from a prior simulation with and without the operating point.


COMPONENT: simulink_features
EXAMPLENAME: SavingMemoryInPrelookupAndInterpolationBlocksExample
EXAMPLETITLE: Saving Memory in Prelookup and Interpolation Blocks by Using Smaller Data
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Save memory in Prelookup and Interpolation blocks. The Prelookup and Interpolation Using Prelookup blocks allow you to explicitly set data type storing breakpoints and table data. Note that the Prelookup block allows the breakpoint data to differ from the input data type, and the Interpolation Using Prelookup block allows the table data to differ from the output data type.


COMPONENT: simulink_features
EXAMPLENAME: UsingBusesWithLegacyFunctionsHavingStructureArgumentsExample
EXAMPLETITLE: Using Buses with Legacy Functions Having Structure Arguments
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions with structure arguments using Simulink® buses.


COMPONENT: simulink_features
EXAMPLENAME: ModelAdvisorExample
EXAMPLETITLE: Model Advisor
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The capabilities of the Model Advisor to check a model or subsystem for conditions and configuration settings that can result in inaccurate or inefficient simulation of the system represented by the model or generation of inefficient code from the model. The Model Advisor produces a report that lists all the suboptimal conditions or settings that it finds, suggesting better model configuration settings where appropriate.


COMPONENT: simulink_features
EXAMPLENAME: DataTypingFilterExample
EXAMPLETITLE: Data Typing Filter
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Apply a filter to signals of different data types using standard Simulink® blocks. In this example, a signal with some noise is produced. This signal is then fed into a filter as a single precision data type and a standard double data type. The output from the filter for each signal is then compared and the error is displayed on the scope.


COMPONENT: simulink_features
EXAMPLENAME: VectorizingAScalarAlgorithmWithForEachSubsystemExample
EXAMPLETITLE: Vectorizing a Scalar Algorithm with a For-Each Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the for-each subsystem. In this example, the operations are performed on a vector for simplicity.


COMPONENT: simulink_features
EXAMPLENAME: SimulinkSubsystemSemanticsExample
EXAMPLETITLE: Simulink Subsystem Semantics
PRODUCT: MATLAB;Simulink;Stateflow
DESCRIPTION:
This set of examples shows different types of Simulink® Subsystems and what semantics are used when simulating these subsystems. Each example provides a description of the model and the subtleties governing how the model is executed.


COMPONENT: simulink_features
EXAMPLENAME: ModelReferenceVariantsExample
EXAMPLETITLE: Model Reference Variants
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use model reference variants. A Model block is used to reference one Simulink® model from another Simulink model. A Variant Subsystem block can contain Model blocks as variants. A variant describes one of N possible modes in which a Variant Subsystem block can operate. Each variant references a specific model with its associated model-specific arguments. For a given Variant Subsystem block, only one variant is active during simulation. You can switch the active variant by changing the values of variables in the base workspace or by manually overriding variant selection using the Variant Subsystem block dialog box.


COMPONENT: simulink_features
EXAMPLENAME: FixedPointParametersInLegacyFunctionsExample
EXAMPLETITLE: Fixed Point Parameters in Legacy Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that pass their inputs and outputs using parameters of fixed point data type.


COMPONENT: simulink_features
EXAMPLENAME: AdvancedEnabledSubsystemsExample
EXAMPLETITLE: Advanced Enabled Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
What happens when a sine wave is fed into an enabled subsystem. The four subsystems in the model contain integrators, either discrete or continuous as described by the subsystem name. After running the simulation, the two scopes show the results for the discrete enabled subsystems (top scope) and continuous enabled subsystems (bottom scope).


COMPONENT: simulink_features
EXAMPLENAME: DetWhySlAccelRegeneratingCodeExample
EXAMPLETITLE: Determine Why Simulink Accelerator Is Regenerating Code
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Sometimes Simulink® regenerates the simulation target for a model at the beginning of a simulation in Accelerator Mode but it is not always clear why regeneration happens. This example shows how to use Simulink MATLAB® commands to determine why Simulink regenerates code for Accelerator Mode simulations.


COMPONENT: simulink_features
EXAMPLENAME: ConvertingSubsystemsToModelReferenceExample
EXAMPLETITLE: Convert Subsystem to Referenced Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Demonstrates how to convert a subsystem to a referenced model by using the Model Reference Conversion Advisor tool or the Simulink.SubSystem.convertToModelReference function.


COMPONENT: simulink_features
EXAMPLENAME: OutputPassedByReturnArgumentFromLegacyFunctionsExample
EXAMPLETITLE: Output Passed by Return Argument from Legacy Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that pass their output as a return argument.


COMPONENT: simulink_features
EXAMPLENAME: ModelingReusableComponentsUsingMultiplyInstancedExample
EXAMPLETITLE: Model Reusable Components Using Multiply Instanced Simulink Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In this example, the model slexCounterFunctionMdlRef contains the Simulink® function update , which maintains a counter. Multiple instancing provides the ability to reuse this logic as CounterA and CounterB in this example model.


COMPONENT: simulink_features
EXAMPLENAME: MulticoreProgrammingOfAFieldOrientedControlOnZynqExample
EXAMPLETITLE: Multicore Programming of a Field-Oriented Control on Zynq
PRODUCT: MATLAB;Embedded Coder;HDL Coder;Simulink;Simscape Electrical
DESCRIPTION:
Demonstrates how to implement a control algorithm that contains multiple rates on Zynq®. To take advantage of both the cores and the FPGA hardware, the example uses a graphical partitioning approach such that code from different partitions is distributed across the cores and the hardware.


COMPONENT: simulink_features
EXAMPLENAME: RunQualityChecksOnSFunctionsExample
EXAMPLETITLE: Run Quality Checks on S-Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use S-Function analyzer programmatic interfaces to check S-functions for potential problems and improvements.


COMPONENT: simulink_features
EXAMPLENAME: RapidAcceleratorSimulationsUsingParsimExample
EXAMPLETITLE: Rapid Accelerator Simulations Using Parsim
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink
DESCRIPTION:
The use of Rapid Accelerator in applications that require running parallel simulations for a range of input and parameter values.


COMPONENT: simulink_features
EXAMPLENAME: ImportingACoSimulationFMUIntoSimulinkExample
EXAMPLETITLE: Import Co-Simulation FMU into Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the FMU Import block to load an FMU file. The FMU file supports execution in co-simulation mode. Simulink® software supports stepping back and forth, tuning parameters in between, and saving states for the FMU Import block as long as the FMU itself supports these features.


COMPONENT: simulink_features
EXAMPLENAME: ImplementAnFFTOnAMulticoreProcessorAndAnFPGAExample
EXAMPLETITLE: Implement an FFT on a Multicore Processor and an FPGA
PRODUCT: MATLAB;Simulink;Simulink Coder;HDL Coder
DESCRIPTION:
Take advantage of a multicore processor target with FPGA acceleration by graphically partitioning a model. This example requires Simulink Coder™ to generate multi-threaded code and HDL Coder™ to generate HDL code. You cannot generate HDL code on Macintosh systems.


COMPONENT: simulink_features
EXAMPLENAME: IfThenElseBlocksExample
EXAMPLETITLE: If-Then-Else Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The effect of feeding a sine wave into If Action Subsystem blocks. It is designed to illustrate the similarity between the If Action Subsystem block and the Enabled Subsystem block.


COMPONENT: simulink_features
EXAMPLENAME: ParsimTestCaseSweepExample
EXAMPLETITLE: Parallel Simulations Using Parsim: Test-Case Sweep
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink
DESCRIPTION:
Run multiple Simulink® simulations corresponding to different test cases in the Signal Editor block using SimulationInput objects and the parsim command. The parsim command uses Parallel Computing Toolbox™, if it is available, to run simulations in parallel, otherwise the simulations are run in serial.


COMPONENT: simulink_features
EXAMPLENAME: MulticoreDeploymentOfAPlantModelExample
EXAMPLETITLE: Multicore Deployment of a Plant Model
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Illustrates how to take advantage of executing multithreaded code on a multicore processor using graphical partitioning. This example requires Simulink® Coder™ to generate multithreaded code.


COMPONENT: simulink_features
EXAMPLENAME: DiscreteAndContinuousResettableSubsystemsExample
EXAMPLETITLE: Discrete and Continuous Resettable Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Compares the behavior of discrete and continuous resettable subsystems. After you run the simulation, one scope shows the results for the discrete resettable subsystem, and the other scope shows the results for the continuous resettable subsystem.


COMPONENT: simulink_features
EXAMPLENAME: ParallelChannelPowerAllocationExample
EXAMPLETITLE: Parallel Channel Power Allocation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A potential use of the Find Nonzero Elements block. This block outputs a variable-size signal containing the indices of the nonzero values of the input.


COMPONENT: simulink_features
EXAMPLENAME: SimulateFMUWithEnumTypePortsExample
EXAMPLETITLE: Simulate FMU with Enum Type Ports using FMU Import Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The example demonstrates how to use the FMU import block to simulate FMUs that have enumerated data type ports. The FMU import block enables the import of functional mockup units (FMUs) in Simulink.


COMPONENT: simulink_features
EXAMPLENAME: IntroductionToAcceleratingModelsExample
EXAMPLETITLE: Introduction to Accelerating Models
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulink® Accelerator™ speeds up the execution of your model, by creating and compiling C code. This C code takes the place of the interpretive code that Simulink uses when in Normal mode (that is, when Simulink® is not in Accelerator mode). Simulink Accelerator generates the C code from the Simulink model and invokes the MATLAB® mex function to compile and dynamically link the generated code to Simulink. This code generation and compilation process happens the first time you accelerate the model and any time the model changes are significant enough to require re-generation (for example, the addition of a block).


COMPONENT: simulink_features
EXAMPLENAME: DataTypingInSimulinkExample
EXAMPLETITLE: Data Typing in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use data types in Simulink®. The model used in this example converts a double-precision sine wave having an amplitude of 150 to various data types and displays the converted signals on two scopes.


COMPONENT: simulink_features
EXAMPLENAME: ImportingAModelExchangeFMUIntoSimulinkExample
EXAMPLETITLE: Importing a Model Exchange FMU into Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model showing how to use the FMU Import block to load an FMU file. The FMU file supports execution in Model Exchange mode.


COMPONENT: simulink_features
EXAMPLENAME: ModelingObjectsWithIdenticalDynamicsExample
EXAMPLETITLE: Modeling Objects with Identical Dynamics Using For Each Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model multiple objects with identical dynamics using the For Each subsystem. The number of objects is parameterized by the length of the input signal.


COMPONENT: simulink_features
EXAMPLENAME: BlockPriorityExample
EXAMPLETITLE: Set Priority in Execution Order of Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
What happens when blocks are assigned different execution order priorities. The block priority affects the order in which the blocks are executed. You can set the block priority through the Block Properties dialog. Starting in R2023b, the Priority property is available only when the Execution Order property is set to Based on priority . For versions prior to R2023b, the Priority property is available by default. the A smaller number indicates a higher priority.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_hardstopExample
EXAMPLETITLE: Friction Model with Hard Stops
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model friction one way in Simulink®. The two integrators in the model calculate the velocity and position of the system, which is then used in the Friction Model to calculate the friction force.


COMPONENT: simulink_general
EXAMPLENAME: CaptureVelocityOfABouncingBallMemoryBlockExample
EXAMPLETITLE: Capture the Velocity of a Bouncing Ball with the Memory Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The sldemo_bounce example shows how to use the Second-Order Integrator and Memory blocks to capture the velocity of a bouncing ball just before it hits the ground.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_tankExample
EXAMPLETITLE: Tank Fill and Empty with Animation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model the dynamics of liquid in a tank. The animation provides a graphical display of the tank as it empties and refills, based on tank parameters. When you click START SIM , the tank fills up and empties. When the simulation ends, review the plot showing the liquid height and the states of the two valves.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_foucaultExample
EXAMPLETITLE: Modeling a Foucault Pendulum
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a Foucault pendulum. The Foucault pendulum was the brainchild of the French physicist Leon Foucault. It was intended to prove that Earth rotates around its axis. The oscillation plane of a Foucault pendulum rotates throughout the day as a result of axial rotation of the Earth. The plane of oscillation completes a whole circle in a time interval T, which depends on the geographical latitude.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_zeroxingExample
EXAMPLETITLE: Accurate Zero-Crossing Detection
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How zero crossings work in Simulink®. In this model, three shifted sine waves are fed into an absolute value block and saturation block. At exactly t = 5, the output of the switch block changes from the absolute value to the saturation block. Zero crossings in Simulink will automatically detect exactly when the switch block changes its output, and the solver will step to the exact time that the event happens. This can be seen by examining the output in the scope.


COMPONENT: simulink_general
EXAMPLENAME: penddemoExample
EXAMPLETITLE: Inverted Pendulum with Animation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use a Simulink® to model and animate an inverted pendulum system. An inverted pendulum has its center of mass above its pivot point. To stably maintain this position, the system implements control logic to move the pivot point below the center-of mass as the pendulum starts to fall. The inverted pendulum is a classic dynamics problem used to test control strategies.


COMPONENT: simulink_general
EXAMPLENAME: CopyConfigurationFromOneModelToAnotherModelExample
EXAMPLETITLE: Copy Configuration From One Model to Another Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To create a copy of the active configuration for the model sldemo_bounce and attach the copy to the model sldemo_boiler.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_wavethd_scriptExample
EXAMPLETITLE: Digital Waveform Generation: Approximate a Sine Wave
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Design and evaluate a sine wave data table for use in digital waveform synthesis applications in embedded systems and arbitrary waveform generation instruments.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_doublebounceExample
EXAMPLETITLE: Double Bouncing Ball: Use of Adaptive Zero-Crossing Location
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Choose the correct zero-crossing location algorithm, based on the system dynamics. For Zeno dynamic systems, or systems with strong chattering, you can select the adaptive zero-crossing detection algorithm through the Configure pane:


COMPONENT: simulink_general
EXAMPLENAME: sldemo_solversExample
EXAMPLETITLE: Explore Variable-Step Solvers with Stiff Model
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
The behavior of variable-step solvers in a Foucault pendulum model. Simulink® solvers ode45 , ode15s , ode23 , and ode23t are used as test cases. Stiff differential equations are used to solve this problem. There is no exact definition of stiffness for equations. Some numerical methods are unstable when used to solve stiff equations and very small step sizes are required to obtain a numerically stable solution to a stiff problem. A stiff problem may have a fast changing component and a slow changing component.


COMPONENT: simulink_general
EXAMPLENAME: CopyAndRenameConfigurationSetExample
EXAMPLETITLE: Copy and Rename Configuration Set
PRODUCT: MATLAB;Simulink
DESCRIPTION:
To create a copy of the active configuration for the model sldemo_bounce and attach the copy to the model sldemo_boiler. Use the allowRename argument to avoid naming conflicts.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_dblcart1Example
EXAMPLETITLE: Double Spring Mass System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a double spring-mass-damper system with a periodically varying forcing function. The model uses an S-Function block to animate the mass system during simulation. In the system, the only sensor is attached to the mass on the left, and the actuator is attached to the mass on the left. The example uses state estimation and linear-quadratic regulator (LQR) control.


COMPONENT: simulink_general
EXAMPLENAME: MatrixFeebackExample
EXAMPLETITLE: Model Feedback Control System
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a feedback control system using Simulink® signals that carry matrix and vector representations of different components of the feedback system. In this example, the controller is designed for a buck-boost converter to track a reference voltage signal. Buck-boost converters are extensively used in distributed power supply systems and modern power electronics devices due to their high efficiency, high power density, low cost, and compact size.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_metroExample
EXAMPLETITLE: Exploring the Solver Jacobian Structure of a Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The example shows how to use Simulink® to explore the solver Jacobian sparsity pattern, and the connection between the solver Jacobian sparsity pattern and the dependency between components of a physical system. A Simulink model that models the synchronization of three metronomes placed on a free moving base are used.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_bounceExample
EXAMPLETITLE: Simulation of Bouncing Ball
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Uses two models of a bouncing ball to show different approaches to modeling hybrid dynamic systems with Zeno behavior. Zeno behavior is informally characterized by an infinite number of events occurring in a finite time interval for certain hybrid systems. As the ball loses energy, the ball collides with the ground in successively smaller intervals of time.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_foucault_vrExample
EXAMPLETITLE: Foucault Pendulum Model with VRML Visualization
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Solve the differential equations for the Foucault Pendulum problem and displays the pendulum bob movement in the VRML scene. You can modify the Pendulum location by changing the Latitude / Longitude constant values in the model and other parameters (g, Omega, L and initial conditions) in MATLAB® workspace.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_countersExample
EXAMPLETITLE: Counters Using Conditionally Executed Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Implement counters using Enabled and Triggered subsystems. In this example, the model sldemo_counters controls flow of water into a tank and uses a counter to count the number of times overflow occurs.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_househeatExample
EXAMPLETITLE: Thermal Model of a House
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Simulink® to create the thermal model of a house. This system models the outdoor environment, the thermal characteristics of the house, and the house heating system.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_hydcylExample
EXAMPLETITLE: Single Hydraulic Cylinder Simulation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Simulink® to model a hydraulic cylinder. You can apply these concepts to applications where you need to model hydraulic behavior. See two related examples that use the same basic components: four cylinder model and two cylinder model with load constraints.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_bangbangExample
EXAMPLETITLE: State Events
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Handle state events. Run the simulation and see the phase plane plot, where the state x1 is along the X-axis and the state x2 is along the Y-axis.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_hydrodExample
EXAMPLETITLE: Two Cylinder Model with Load Constraints
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model a rigid rod supporting a large mass interconnecting two hydraulic actuators. The model eliminates the springs as it applies the piston forces directly to the load. These forces balance the gravitational force and result in both linear and rotational displacement.


COMPONENT: simulink_general
EXAMPLENAME: VanDerPolOscillatorExample
EXAMPLETITLE: Van der Pol Oscillator
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Model the second-order Van der Pol (VDP) differential equation in Simulink®. In dynamics, the VDP oscillator is non-conservative and has nonlinear damping. At high amplitudes, the oscillator dissipates energy. At low amplitudes, the oscillator generates energy. The oscillator is given by this second-order differential equation:


COMPONENT: simulink_general
EXAMPLENAME: sldemo_hydcyl4Example
EXAMPLETITLE: Four Hydraulic Cylinder Simulation
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Simulink® to create a model with four hydraulic cylinders. See two related examples that use the same basic components: single cylinder model and model with two cylinders and load constraints.


COMPONENT: simulink_general
EXAMPLENAME: sldemo_boilerExample
EXAMPLETITLE: Bang-Bang Control Using Temporal Logic
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use Stateflow® to model a bang-bang temperature control system for a boiler. The boiler dynamics are modeled in Simulink®.


COMPONENT: simulink_industrial
EXAMPLENAME: FindShortestControlPathinSimulinkModelExample
EXAMPLETITLE: Find Shortest Control Path in Simulink Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How to find the shortest control path for a hybrid electrical vehicle using Signal Tracing Command-line API.


COMPONENT: simulink_industrial
EXAMPLENAME: BumplessControlTransferBetweenManualAndPIDControlExample
EXAMPLETITLE: Bumpless Control Transfer Between Manual and PID Control
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Achieve bumpless control transfer when switching from manual control to proportional integral derivative (PID) control. The model uses the PID Controller block in Simulink® to control a first-order process with dead-time.


COMPONENT: simulink_industrial
EXAMPLENAME: TwoDegreeofFreedomPIDControlForSetpointTrackingExample
EXAMPLETITLE: Two Degree-of-Freedom PID Control for Setpoint Tracking
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Regulate the speed of an electric motor using two degree-of-freedom PID control with set-point weighting. This model uses the PID Controller (2DOF) block. The model changes the setpoint values between 60 and 30 rpm. To convert the units to rad/s for use in the PID controller, the model uses a Signal Conversion block.


COMPONENT: simulink_industrial
EXAMPLENAME: AntiWindupControlUsingAPIDControllerExample
EXAMPLETITLE: Anti-Windup Control Using PID Controller Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use anti-windup schemes to prevent integration wind-up in PID controllers when the actuators are saturated. The PID Controller block in Simulink® features two built-in anti-windup methods, back-calculation and clamping , as well as a tracking mode to handle more complex industrial scenarios. The PID Controller block supports several features that allow it to handle controller windup issues under commonly encountered industrial scenarios.


COMPONENT: simulink_masking
EXAMPLENAME: DynamicMaskDialogBoxExample
EXAMPLETITLE: Dynamic Mask Dialog Box
PRODUCT: MATLAB
DESCRIPTION:
You can create dialogs for masked blocks whose appearance changes in response to user input. Features of masked dialog boxes that can change in this way include:


COMPONENT: simulink_masking
EXAMPLENAME: MaskDisplayAndInitializationCommandsExample
EXAMPLETITLE: Mask Display and Initialization Commands
PRODUCT: MATLAB
DESCRIPTION:
Create icons for the masked blocks. You can either create static or dynamic icons. Static icons remain unchanged. Dynamic icons are created with the mask parameters, hence the icon changes with a change in the mask parameters. This example shows how to use drawing commands to create a mask icon.


COMPONENT: simulink_masking
EXAMPLENAME: PromoteMultipleParametersAsOneOnMaskExample
EXAMPLETITLE: Promote Block Parameters on a Mask
PRODUCT: MATLAB
DESCRIPTION:
Blocks and subsystems can have multiple parameters associated with them. Block masks allow you to expose one or more of these parameters while hiding others from view. You can promote any underlying parameter of a block either to a block mask or to a subsystem mask. For any subsystem, you have a single view of all the nested blocks, the block parameters, and internal parameters. You can click on any node to access any promotable parameter within the nested blocks. By promoting parameters from the block dialog box to the mask you can:


COMPONENT: simulink_masking
EXAMPLENAME: MaskLookupTableControlExample
EXAMPLETITLE: Visualize and Plot N-Dimensional Data Using Mask Lookup Table Control
PRODUCT: MATLAB
DESCRIPTION:
Use a lookup table to evaluate a sampled representation of a function using simple lookup operations. It enables you to assess the function with less computation time than running the function. You can visualize, edit, and plot N-dimensional lookup table data in mask dialog using the lookup table control.


COMPONENT: simulink_masking
EXAMPLENAME: PreserveTunabilityOfParametersExample
EXAMPLETITLE: Preserve Tunability of Parameters That Are Modified or Created in Mask Initialization
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A desirable feature of code generated from a model is the ability to tune variables to different values. To achieve this, user-defined variables in the model must be present in the generated code. If a model contained blocks with mask initialization commands that creates a new variable or modified an existing mask dialog parameter in the mask initialization, and if that parameter or variable is referenced in a child block, the values of the mask parameter or variable were in-lined in the generated code. The parameters were not tunable even if they referred to a workspace variable.


COMPONENT: simulink_masking
EXAMPLENAME: PortConstraintsExample
EXAMPLETITLE: Validate Input and Output Port Signals Using Port Constraints
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can validate compile-time signal attributes on the input and output ports of a masked block by using port constraints. Compile-time signal attributes include data type, complexity, and dimensions. You can define the rules to validate the data types, the complexity (real or complex), and dimensions (scalar, vector, or 2-D matrix) of port signals. You can also add parameter conditions to the constraint. The port constraints are active on the associated port only when it satisfies all the parameter conditions. Port constraints allow you to check that signal attributes satisfy the specified rules without having to write validation code. The mask identifies each port with port identifiers. You associate the port constraint to a port identifier.


COMPONENT: simulink_masking
EXAMPLENAME: SharePortConstraintAcrossMultiplePortsExample
EXAMPLETITLE: Share Port Constraints Across Multiple Masked Blocks
PRODUCT: MATLAB
DESCRIPTION:
Create a port constraint and share it across masks of different blocks in the same model or different models. The port constraint definition is saved in an XML file and can be associated with ports across multiple masked blocks. The XML file must be available on the MATLAB® path.


COMPONENT: simulink_masking
EXAMPLENAME: SharedConstraintsExample
EXAMPLETITLE: Share Parameter Constraints Across Multiple Block Masks
PRODUCT: MATLAB
DESCRIPTION:
Create a parameter constraint and share it across masks of different blocks in the same model or different models. You can save the parameter constraint in a XML file and associate the constraint across multiple block masks. Defining a shared constraint in an XML file enables you to edit the data and compare the file with a previous version.


COMPONENT: simulink_masking
EXAMPLENAME: CrossPortConstraintExample
EXAMPLETITLE: Validate Port Signals Among Ports of the Same Masked Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create cross port constraints to validate compile-time signal attributes among ports of the same masked block. For example, you can set a constraint among the input and output port signals of the masked block to have the same data type. The rules for the cross port constraints are predefined. The available rules are Same Data Type and Same Dimension . Additionally, you can also set parameter conditions. Each port in the masked block is identified by port identifiers. The cross port constraint association is done through port identifiers.


COMPONENT: simulink_masking
EXAMPLENAME: SimulinkMaskingDemosExample
EXAMPLETITLE: Simulink Masking Examples
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The slexMaskingExamples model contains a set of conceptual examples that demonstrate capabilities of Simulink® Masking.


COMPONENT: simulink_masking
EXAMPLENAME: UnsafeNestedCallbackExample
EXAMPLETITLE: Unsafe Nested Callback
PRODUCT: MATLAB
DESCRIPTION:
A subsystem Simplified Multi Gain System containing another subsystem Multi Gain System . The objective is to tweak the parameter of the gain block in Multi Gain System through the mask parameters of Simplified Multi Gain System .


COMPONENT: simulink_masking
EXAMPLENAME: UnsafeMaskCallbackErrorExample
EXAMPLETITLE: Unsafe Mask Callback Error
PRODUCT: MATLAB
DESCRIPTION:
In this example, the "System Configurator" is a masked subsystem that is used to configure the "Gain" block. Such use of Mask callbacks, where the callback modifies entities outside of its scope may result in unexpected behavior.


COMPONENT: simulink_masking
EXAMPLENAME: CustomizeMaskParameterConstraintsExample
EXAMPLETITLE: Custom Constraint for Mask Parameter
PRODUCT: MATLAB
DESCRIPTION:
A mask can contain parameters that accept user input values. You can provide input values for mask parameters using the mask dialog box. Mask parameter constraints help you to create validations on a mask parameter without having to write your own validation code. Constraints ensure that input value for the mask parameter satisfies the rules associated with the constraints. For example, consider a masked Subsystem block. You can set a constraint where the input value must be even number. If you provide an input that is not an even number, an error is displayed. If the rule you want specify is not present as one of the attributes, then specify a MATLAB® expression that returns a scalar.


COMPONENT: simulink_masking
EXAMPLENAME: CreateASimpleMaskExample
EXAMPLETITLE: Create a Simple Mask
PRODUCT: MATLAB
DESCRIPTION:
You can mask a block interactively by using the Mask Editor or mask it programmatically. This example describes how to mask a block using the Mask Editor . To mask a block programmatically, see Control Masks Programmatically


COMPONENT: simulink_masking
EXAMPLENAME: MaskCallbacksInMATLABFileExample
EXAMPLETITLE: Organize Mask Initialization and Callbacks in a MATLAB File
PRODUCT: MATLAB
DESCRIPTION:
You can organize mask initialization and mask callback code in a separate MATLAB® class file. By using a separate MATLAB file you can:


COMPONENT: simulink_messages
EXAMPLENAME: EthernetUsingMessagesSimEventsAndStateflowExample
EXAMPLETITLE: Model an Ethernet Communication Network with CSMA/CD Protocol
PRODUCT: MATLAB;SimEvents;Simulink;Stateflow
DESCRIPTION:
Model an Ethernet communication network with CSMA/CD protocol using Simulink® messages and SimEvents®. In the example, there are three computers that communicate through an Ethernet communication network. Each computer has a software component that generates data and an Ethernet interface for communication. Each computer attempts to send the data to another computer with a unique MAC address. An Ethernet interface controls the interaction between a computer and the network by using a CSMA/CD communication protocol. The protocol is used to respond to collisions that occur when multiple computers send data simultaneously. The Ethernet component represents the network and the connection between the computers.


COMPONENT: simulink_messages
EXAMPLENAME: UseMessagesSimEventsAndStateflowforCommunicationExample
EXAMPLETITLE: Build a Shared Communication Channel with Multiple Senders and Receivers
PRODUCT: MATLAB;SimEvents;Stateflow;Simulink
DESCRIPTION:
Model communication through a shared channel with multiple senders and receivers by using Simulink® messages, SimEvents®, and Stateflow®.


COMPONENT: simulink_messages
EXAMPLENAME: MessageCommunicationPacketLossChannelFailureExample
EXAMPLETITLE: Model Wireless Message Communication with Packet Loss and Channel Failure
PRODUCT: MATLAB;SimEvents;Stateflow;Simulink
DESCRIPTION:
Model wireless message communication with packet loss and channel failure by using Simulink® messages, Stateflow®, and SimEvents®.


COMPONENT: simulink_variants
EXAMPLENAME: StructuresGroupRelatedControlVariablesOfVariantBlocksExample
EXAMPLETITLE: Structures to Group Related Variant Control Variables of Variant Blocks
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
Use MATLAB® structure elements to group related variant control variables. You can control the characteristics of structures in the generated code and the placement of structures in memory. For more information, see Structures.


COMPONENT: simulink_variants
EXAMPLENAME: ApproachesToControlActiveVariantChoiceOfVariantBlocksExample
EXAMPLETITLE: Approaches to Control Active Variant Choice of a Variant Block Using Mask or Model Workspace
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Different approaches to control the active choice of inline variant and Variant Subsystem blocks from a mask or a model workspace. For more information on Variant blocks, see What Are Variants and When to Use Them.


COMPONENT: simulink_variants
EXAMPLENAME: ConvertVSSWithLabelsToVASThroughBlockDialogExample
EXAMPLETITLE: Convert Variant Subsystem Block with Labels to Variant Assembly Subsystem Block Interactively
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert a Variant Subsystem block that is in label mode to a Variant Assembly Subsystem block through Block Parameters dialog box. The Variant Assembly Subsystem block has the same variant choices as the Variant Subsystem block. However, the subsystem choices are converted to Subsystem Reference choices and saved as subsystem files during block conversion.


COMPONENT: simulink_variants
EXAMPLENAME: RunExeForValuesOfVariantParametersWithoutCodeRecompileExample
EXAMPLETITLE: Run Executable for Different Variant Parameter Values Without Recompiling Code
PRODUCT: MATLAB;Embedded Coder
DESCRIPTION:
Generate an executable that runs for different set of variant parameter values without needing to recompile the code for each set of values.


COMPONENT: simulink_variants
EXAMPLENAME: CreateVariantControlsUsingEnumeratedDataTypesExample
EXAMPLETITLE: Create Variant Controls Using MATLAB Enumeration Class
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Each variant choice in a Simulink® model is associated with a conditional expression called a variant control . The variant control which evaluates to true determines the active variant choice in the model. This example shows how to create variant controls in your model using a MATLAB® enumeration in the variant condition expressions. In code generation, enumerated types improve readability because condition values are represented as meaningful names instead of literal values.


COMPONENT: simulink_variants
EXAMPLENAME: BuiltInMatchFiltersWithfindsystemForVariantBlocksExample
EXAMPLETITLE: Use find_system with Built-In MatchFilter Options for Variant Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Compares the pre-compile and post-compile time results when using the find_system function with the built-in MatchFilter functions. These filters help to find variant blocks that are active in simulation or part of the generated code:


COMPONENT: simulink_variants
EXAMPLENAME: GeneratePreprocessorConditionalsForVariantParametersExample
EXAMPLETITLE: Compile Code Conditionally for All Values of Variant Parameters with Same and Different Dimensions
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
Generate a C code that contains all the active and inactive values of variant parameters. The values are enclosed in preprocessor conditionals #if and #elif that enables you to compile the code conditionally based on the condition that evaluates to true .


COMPONENT: simulink_variants
EXAMPLENAME: FindSystemMatchFilterUsingCustomFunctionExample
EXAMPLETITLE: Filter Search Using Custom Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the MatchFilter argument with a custom filter function to find blocks other than Inport and Outport blocks in the vdp model.


COMPONENT: simulink_variants
EXAMPLENAME: VPSimulinkVariantObjectConditionReuseExample
EXAMPLETITLE: Simulink.VariantExpression Objects for Variant Condition Reuse of Variant Parameters
PRODUCT: MATLAB;Simulink
DESCRIPTION:
After identifying the variant values that your model requires, you can construct complex variant conditions to control the activation of your variant parameter values by defining variant conditions as Simulink.VariantExpression objects. Simulink.VariantExpression objects enable you to reuse common variant conditions across models and help you encapsulate complex variant condition expressions.


COMPONENT: simulink_variants
EXAMPLENAME: ReduceAVariantModelForSelectedVariantConfigurationExample
EXAMPLETITLE: Reduce Model Containing Variant Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Reduce a Simulink® model that contains variant blocks both programmatically and by using Variant Reducer in Variant Manager.


COMPONENT: simulink_variants
EXAMPLENAME: ControlVariantChoicesOfMaskedVASInExpModeUsingMaskParamExample
EXAMPLETITLE: Switch Between Variant Choices of Masked Variant Assembly Subsystem Block in Expression Mode
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In this example, you create one MATLAB™ class per variant choice. To activate a variant choice, you instantiate the corresponding class using a mask parameter object. You then access the class property to get the name of the variant file to be activated. Simulink® then compares the variant filename to the variant choice names by evaluating the variant control expressions and activates the variant choice for the expression that evaluates to true .


COMPONENT: simulink_variants
EXAMPLENAME: ReduceAVariantParameterModelExample
EXAMPLETITLE: Reduce Model Containing Variant Parameters
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Reduce a Simulink® model that contains variant parameters using Variant Reducer in Variant Manager. The example explains the reduction process for these scenarios:


COMPONENT: simulink_variants
EXAMPLENAME: PromoteMaskIconOfActiveVariantToVSSExample
EXAMPLETITLE: Automatic Mask Icon Promotion in Variant Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Demonstrates how Simulink® automatically displays the mask icon of the active variant block on the parent Variant Subsystem block. The example shows mask icon promotion for these types of icons:


COMPONENT: simulink_variants
EXAMPLENAME: SimulinkVariantsExample
EXAMPLETITLE: Simulink Variant Examples
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The slexVariantExamples model contains a set of conceptual examples that demonstrate capabilities of Simulink® variants.


COMPONENT: simulink_variants
EXAMPLENAME: CreateStandaloneExecutableWithVariantsSimulinkCompilerExample
EXAMPLETITLE: Create Standalone Executables with Variants Using Simulink Compiler
PRODUCT: MATLAB;Simulink;Simulink Compiler
DESCRIPTION:
Create a standalone executable with a Variant Subsystem using the Simulink® Compiler™ workflow. You can use the same workflow for the Variant Source and Variant Sink blocks as well. Set the Variant activation time of the Variant block to startup . With 'startup' variant activation time, you can change the active variant via an input to the executable.


COMPONENT: simulink_variants
EXAMPLENAME: AnalyzeVariantConfigurationsInModelRefPageExample
EXAMPLETITLE: Analyze Variant Configurations Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the Simulink.VariantConfigurationAnalysis class to analyze variant configurations programmatically.


COMPONENT: simulink_variants
EXAMPLENAME: AddMissingPortsToVariantSubsystemBlockExample
EXAMPLETITLE: Add Missing Ports to Variant Subsystem Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Explains how to add missing ports to a Variant Subsystem block to align them with the number and type of ports in its variant choices.


COMPONENT: simulink_variants
EXAMPLENAME: VariantConditionValuesOfEnumeratedInCodeExample
EXAMPLETITLE: Represent Variant Condition Values of Enumerated Type in Generated Code
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
You can generate C code from a Simulink® model with variant condition variables or values of Simulink-supported Use Enumerated Data in Simulink Models. Enumerated types improve code readability because the condition values and variables in control expressions are represented as meaningful names instead of integers. In this section, you will learn:


COMPONENT: simulink_variants
EXAMPLENAME: AddAndDeletePortsFromVariantSubsystemBlockExample
EXAMPLETITLE: Add Missing Ports and Delete Unused Ports from Variant Subsystem Block
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Explains how to add missing ports and delete unused ports from a Variant Subsystem block to align them with the number and types of ports in its variant choices.


COMPONENT: simulink_variants
EXAMPLENAME: CreateRealTimeAppsUsingVariantsAndSimulinkRealTimeExample
EXAMPLETITLE: Create Real-Time Applications Using Variants and Simulink Real-Time
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Create a real-time application with a variant subsystem by using the Simulink® Real-Time™ workflow. Simulink Real-Time lets you create real-time applications from Simulink models and run them on Speedgoat® target computer hardware connected to your physical system.


COMPONENT: simulink_variants
EXAMPLENAME: ImproveCodeReadabilityOfVariantsParametersUsingEnumExample
EXAMPLETITLE: Improve Code Readability of Variant Parameters Using Enumerated Types
PRODUCT: MATLAB;Simulink Coder;Simulink
DESCRIPTION:
You can use enumerated types to improve code readability of variant control values in variant parameters. Simulink Enumerations improve readability because enumerated types of variant controls values are represented as meaningful names instead of integers in the generated code.


COMPONENT: simulink_variants
EXAMPLENAME: SimVariantBlocksInAccelRapidAccelModesWithSTActivationExample
EXAMPLETITLE: Simulate Variant Blocks in Accelerator and Rapid Accelerator Modes with Startup Activation Time
PRODUCT: MATLAB;Simulink;Embedded Coder;Simulink Coder
DESCRIPTION:
Simulate Variant Source and Variant Sink blocks in accelerator and rapid accelerator mode with startup variant activation time.


COMPONENT: simulink_variants
EXAMPLENAME: CreateVariantControlsUsingAnInMemoryEnumerationClassExample
EXAMPLETITLE: Create Variant Controls Using an In-Memory Enumeration Class
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Each variant choice in a Simulink® model is associated with a conditional expression called a variant control . The variant control that evaluates to true determines the active variant choice in the model. This example shows how to create variant controls in your model using an in-memory enumeration class. The enumeration is created using the Simulink.defineIntEnumType function. You do not need to save the enumeration in a MATLAB® file. In code generation, enumerated types improve readability because condition values are represented as meaningful names instead of literal values.


COMPONENT: simulink_variants
EXAMPLENAME: RunMultipleSimulationsUsingVariantConfigurationsExample
EXAMPLETITLE: Run Simulations for Variant Models Using Variant Configurations
PRODUCT: MATLAB;Simulink;Parallel Computing Toolbox
DESCRIPTION:
Programmatically run single or multiple simulations for a variant model by specifying variant configurations as input to the Simulink.SimulationInput object.


COMPONENT: simulink_variants
EXAMPLENAME: SpecifySimulinkFindOptionsUsingCustomFunctionsExample
EXAMPLETITLE: Specify Search Options with Custom Filter Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the MatchFilter option with a custom filter function to find all Gain blocks with a gain value between 1 and 10 in the model vdp.


COMPONENT: simulink_variants
EXAMPLENAME: PropagateVariantConditionsToModelOrSubsystemReferencesExample
EXAMPLETITLE: Propagate Variant Conditions to Enable or Disable Model or Subsystem References in Hierarchy
PRODUCT: MATLAB
DESCRIPTION:
Simulink® compiles referenced models before propagating variant conditions. A variant condition can activate or deactivate a Model block, but the variant condition does not propagate into the referenced model. Instead, it stays on the boundary. However, the blocks inside the referenced model inherit the variant condition from the Model block.


COMPONENT: simulink_variants
EXAMPLENAME: SimulinkParameterObjectsForCodeGenerationInVariantBlocksExample
EXAMPLETITLE: Simulink.Parameter Type of Variant Control Variables for Code Generation in Variant Blocks
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
If you intend to generate code for a model containing variant blocks, specify variant control variables as Simulink.Parameter objects. Simulink.Parameter objects allow you to specify other attributes, such as data type and storage class, and control the appearance and placement of variant control variables in generated code.


COMPONENT: simulink_variants
EXAMPLENAME: ManualVariantSourceAndManualVariantSinkBlocksExample
PRODUCT: MATLAB;Simulink
EXAMPLETITLE:
Provide Variation in Signal Source and Destination Using Manual Variant Source and Manual Variant Sink Blocks

DESCRIPTION:
Use the inline variant blocks Manual Variant Source and Manual Variant Sink. The Manual Variant Source Block provides variation on the source of a signal. The block is a switch that can have two or more input ports and one output port. Each input port is associated with a variant choice. Only one input port is active during simulation. The active input port determines the active variant region. Similarly, the Manual Variant Sink block provides variation on the destination of a signal. The block can have two or more output ports and one input port. Only one output port can be active during simulation, and the blocks connected to that port determine the active variant.


COMPONENT: simulink_variants
EXAMPLENAME: ChoicesMaskVariantAssemblySubsystemMaskParamObjectExample
EXAMPLETITLE: Switch Between Variant Choices of Masked Variant Assembly Subsystem Block in Label Mode
PRODUCT: MATLAB;Simulink
DESCRIPTION:
In this example, you create one MATLAB® class per variant choice. To activate a variant choice, you instantiate the corresponding class using a mask parameter object. You then access the class property to get the names of the variant choices and to set a variant choice to be active.


COMPONENT: simulink_variants
EXAMPLENAME: MergeFunctioncallSignalsOnVariantSubsytemOutportExample
EXAMPLETITLE: Variant Signals from Variant Subsystem Outport to Function-Call Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Conditionalize the function-call signals to control the execution of a Function-Call Subsystem block using the Variant Subsystem block. The variant condition that propagates to the Function-Call Subsystem block is set to all the ports of the subsystem.


COMPONENT: simulink_variants
EXAMPLENAME: ControlStructuralVariationsUsingMaskParamsModelArgsExample
EXAMPLETITLE: Control Structural Variations Using Mask Parameters and Model Arguments
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Control structural variations using mask parameters and model arguments in a model. You can use mask and model workspace to simulate and generate code for variant blocks with startup activation time.


COMPONENT: simulink_variants
EXAMPLENAME: VerifyAndValidateVariantModelsExample
EXAMPLETITLE: Verify and Validate Variant Models with Code Compile Activation Time
PRODUCT: MATLAB;Simulink;Simulink Design Verifier;Simulink Test
DESCRIPTION:
Verify and validate variant models with code compile variant activation time using Simulink® Design Verifier™ and Simulink Test™.


COMPONENT: simulink_variants
EXAMPLENAME: ManipulateChoiceOfVariantAssemblySubsystemExpressionExample
EXAMPLETITLE: Manipulate Variant Choices of Variant Assembly Subsystem Block in Expression Mode
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Add or remove variant choices from a Variant Assembly Subsystem block that is in the expression mode.


COMPONENT: simulink_variants
EXAMPLENAME: VerifyAndValidateVariantModelsWithStartupActivationTimeExample
EXAMPLETITLE: Verify and Validate Variant Models with Startup Activation Time
PRODUCT: MATLAB;Simulink;Simulink Test;Simulink Design Verifier
DESCRIPTION:
Verify and validate variant models with startup variant activation time using Simulink® Design Verifier™ and test it using Simulink Test™.


COMPONENT: simulink_variants
EXAMPLENAME: ConvertVariantSubsystemBlockToVariantAssemblySubsystemExample
EXAMPLETITLE: Convert Variant Subsystem Block with Labels to Variant Assembly Subsystem Block Programmatically
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Explains how to convert a Variant Subsystem block to a Variant Assembly Subsystem using the convertToVariantAssemblySubsystem method. The Variant Assembly Subsystem block has the same variant choices as the Variant Subsystem block. However, the subsystem choices are converted to Subsystem Reference choices and saved as subsystem files during block conversion.


COMPONENT: simulink_variants
EXAMPLENAME: CreateVariantConfigurationAnalysisObjectExample
EXAMPLETITLE: Create Variant Configuration Analysis Object for Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create a variant configuration analysis object by specifying either named variant configurations or variable groups.


COMPONENT: simulink_variants
EXAMPLENAME: ExportImportFMUModelWithVariantBlocksWithStartupExample
EXAMPLETITLE: Export and Import Function Mockup Unit (FMU) from Model with Variant Subsystem Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Export a standalone Functional Mock-up Unit (FMU) from a model containing a Variant Subsystem block, then import it into a new model.


COMPONENT: simulink_variants
EXAMPLENAME: ConditionallyExecuteSimulinkFunctionsExample
EXAMPLETITLE: Conditionally Execute Simulink Functions
PRODUCT: MATLAB
DESCRIPTION:
With variant blocks, you can conditionalize functions defined using Simulink Function blocks. A variant condition from a variant block does not propagate inside a Simulink Function block. Instead, it stays on the boundary and controls the entire Simulink Function block. For more information, see Simulink Function.


COMPONENT: simulink_variants
EXAMPLENAME: ConvertVSSToVASInExpressionModeProgrammaticallyExample
PRODUCT: MATLAB;Simulink
EXAMPLETITLE:
Convert Variant Subsystem Block with Expressions to Variant Assembly Subsystem Block Programmatically

DESCRIPTION:
Explains how to convert a Variant Subsystem block to a Variant Assembly Subsystem block using the convertToVariantAssemblySubsystem method. The Variant Assembly Subsystem block has the same variant choices as the Variant Subsystem block. However, the subsystem choices are converted to Subsystem Reference choices and saved as subsystem files during block conversion.


COMPONENT: simulink_variants
EXAMPLENAME: CreateASimpleVariantParameterModelExample
EXAMPLETITLE: Create a Simple Variant Parameter Model
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Create variant parameters programmatically and use them in Simulink® blocks to vary the block parameter values based on variant conditions.


COMPONENT: simulink_variants
EXAMPLENAME: SimulinkVariantObjectsConditionReuseOfVariantBlocksExample
EXAMPLETITLE: Simulink.VariantExpression Objects for Variant Condition Reuse of Variant Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
After identifying the variant values that your model requires, you can construct complex variant conditions to control the activation of your variant blocks by defining variant conditions as Simulink.VariantExpression objects. Simulink.VariantExpression objects enable you to reuse common variant conditions across models and help you encapsulate complex variant condition expressions.


COMPONENT: simulink_variants
EXAMPLENAME: ScalarVariablesForRapidPrototypingInVariantBlocksExample
EXAMPLETITLE: Scalar Variant Control Variables for Rapid Prototyping in Variant Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Scalar MATLAB® variant control variables allow you to rapidly prototype variant choices when you are still building your model. Scalar MATLAB variant control variables help you focus more on building your variant choices than on developing the expressions that activate those choices.


COMPONENT: simulink_variants
EXAMPLENAME: VPSimulinkParameterObjectsForCodeGenerationExample
EXAMPLETITLE: Simulink.Parameter Type of Variant Control Variables for Code Generation of Variant Parameters
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
If you intend to generate code for a model containing variant parameters, specify variant control variables as Simulink.Parameter objects. Simulink.Parameter objects allow you to specify other attributes, such as data type and storage class, and control the appearance and placement of variant control variables in generated code.


COMPONENT: simulink_variants
EXAMPLENAME: VariantSourceAndVariantSinkBlocksExample
EXAMPLETITLE: Variant Source and Variant Sink Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Consider the slexVariantSourceAndSink model containing two Variant Source blocks Variant Source1 and Variant Source2 , and a Variant Sink block. The variant conditions at the inports and the outports of the Variant Source and the Variant Sink blocks determine the activation and deactivation of the blocks connected to them. V and W are the variant control variables and are defined in the PostLoadFcn callback of the model.


COMPONENT: simulink_variants
EXAMPLENAME: SimulateVariantSubsystemWithStartupActivationUsingParsimExample
EXAMPLETITLE: Simulate Variant Subsystem with Startup Activation Using parsim
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Simulate a Variant Subsystem with startup activation time using parsim . You can simulate multiple configurations in parallel with the Variant activation time set to startup using parsim . Each configuration will have one active variant.


COMPONENT: simulink_variants
EXAMPLENAME: SimulinkVariantControlAsControlVariablesInVariantBlocksExample
EXAMPLETITLE: Simulink.VariantControl Variables for Coherent Switching of Choices in Variant Blocks
PRODUCT: MATLAB;Simulink
DESCRIPTION:
You can associate a variant control variable of type Simulink.VariantControl with a variant activation time. Simulink.VariantControl variant control variables help you switch variant elements such as blocks and parameters coherently.


COMPONENT: simulink_variants
EXAMPLENAME: VPScalarVariablesForRapidPrototypingExample
EXAMPLETITLE: Numeric Variant Control Values for Rapid Prototyping of Variant Parameters
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Numeric values allow you to rapidly prototype variant values when you are still building your model. Numeric values help you focus more on building your variant values than on developing the expressions that activate those choices.


COMPONENT: simulink_variants
EXAMPLENAME: SimulateVariantSubsystemInStartupWithFastRestartEnabledExample
EXAMPLETITLE: Run Iterative Simulations Without Recompiling Model for Variant Systems Using Fast Restart
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Run iterative simulations on a fog lamp controller system using fast restart. The fog lamp controller system can operate in Driver Switch mode or in Sensor Connected mode. In Driver Switch mode, the driver controls the intensity of the fog lamps. In Sensor Connected mode, a sensor adjusts the intensity of the fog lamps based on the intensity of ambient light in the external environment.


COMPONENT: simulink_variants
EXAMPLENAME: ConvertVSSToVASInExpressionModeThroughBlockDialogExample
EXAMPLETITLE: Convert Variant Subsystem Block with Expressions to Variant Assembly Subsystem Block Interactively
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Convert a Variant Subsystem block that is in expression mode to a Variant Assembly Subsystem block through the Block Parameters dialog box. The Variant Assembly Subsystem block has the same variant choices as the Variant Subsystem block. However, the subsystem choices are converted to Subsystem Reference choices and saved as subsystem files during block conversion.


COMPONENT: simulink_variants
EXAMPLENAME: VPEnumTypesForImprovingCodeReadabilityExample
EXAMPLETITLE: Enumerated Types to Improve Code Readability of Variant Control Variables of Variant Parameters
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
Use enumerated types to give meaningful names to integers used as variant control values. For more information on enumerated type data, see Use Enumerated Data in Simulink Models.


COMPONENT: simulink_variants
EXAMPLENAME: ReuseVariantParameterValuesFromExternalCodeUsingSimParamExample
EXAMPLETITLE: Reuse Variant Parameter Values from Handwritten Code Using Simulink.Parameter Variables
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
Use Simulink.Parameter variables to generate a code that imports variant parameter values from your existing code. Importing variant parameter values allows you to reuse the values that your existing code defines. You can then integrate and compile the generated and existing code into a single executable. You can choose to generate a code that imports variant parameter values at the beginning of code compile, simulation-loop, or model startup phases of simulation and code generation workflows based on the activation time you specify. For more information, see Activate Variant During Different Stages of Simulation and Code Generation Workflow.


COMPONENT: simulink_variants
EXAMPLENAME: GenerateCodeNestedVSSWithCCAndSTActivationExample
EXAMPLETITLE: Generate Code from Nested Variant Subsystem with Code Compile and Startup Activation
PRODUCT: MATLAB;Simulink;Embedded Coder;Simulink Coder
DESCRIPTION:
Illustrates how code compile and startup variant activation time can be used together in two nested variant subsystems.


COMPONENT: simulink_variants
EXAMPLENAME: FindmdlrefsMatchFilterUsingCustomFunctionExample
EXAMPLETITLE: Filter Referenced Model Search Using Custom Functions
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Use the MatchFilter argument with a custom filter function to find all Model blocks for which the InitFcn callback is defined.


COMPONENT: simulink_variants
EXAMPLENAME: AdaptiveInterfaceVariantsExample
EXAMPLETITLE: Adaptive Interface for Variant Subsystems
PRODUCT: MATLAB;Simulink
DESCRIPTION:
How propagating variant conditions outside a Variant Subsystem block enables the block to adapt its interface according to the states of the underlying blocks for different activation times. The example also explains the code that is generated for different activation times. For information on factors that affect the propagation, see Factors That Affect Propagation of Variant Conditions Outside of Variant Subsystem Blocks.


COMPONENT: simulink_variants
EXAMPLENAME: ConditionallyExecuteCustomIRTExample
EXAMPLETITLE: Conditionally Execute Custom Initialize, Reinitialize, Reset, and Terminate Routines
PRODUCT: MATLAB;Simulink
DESCRIPTION:
The custom routine blocks(Initialize Function, Reinitialize Function, Reset Function, and Terminate Function) blocks are preconfigured subsystem blocks that enable you to add custom routines to the default initialize, reset, and terminate routines to change or read block states. You can execute the custom routine conditionally by specifying variant conditions on the Event Listener block within custom routine blocks.


COMPONENT: simulink_variants
EXAMPLENAME: FileNamesAsChoicesInVariantAssemblySubsystemBlockExample
EXAMPLETITLE: Maintain Variant Choices of Variant Assembly Subsystem Block in Model and Subsystem Files
PRODUCT: MATLAB;Simulink
DESCRIPTION:
A Variant Assembly Subsystem block can contain Model blocks, Create and Use Referenced Subsystems in Models blocks, or both as its variant choices. The variant choices are maintained in separate model and subsystem files that are on the MATLAB® path.


COMPONENT: simulink_variants
EXAMPLENAME: VariantSignalsFromVSSToFunctionCallSubsystemsExample
EXAMPLETITLE: Variant Signals from Variant Subsystem Inport to Function-Call Subsystems
PRODUCT: MATLAB;Simulink;Embedded Coder
DESCRIPTION:
Include multiple implementations of a Function-Call Subsystem block as variant choices in a Variant Subsystem block and execute them one at a time. The variant condition that propagates to the function-call subsystem is set to all the ports of the subsystem. When you use conditionally executed subsystems as variant choices:


COMPONENT: simulink_variants
EXAMPLENAME: ReceiveOrOutputFunctioncallSignalsForSimCodeGenExample
EXAMPLETITLE: Variant Signals from Variant Source Outport to Function-Call Subsystem
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Conditionalize function-call signals to control the execution of a function-call subsystem using the Variant Source block. The variant condition that propagates to the Function-Call Subsystem block is set to all the ports of the subsystem.


COMPONENT: simulinkcoder
EXAMPLENAME: UseSingleAsDFUDTExample
EXAMPLETITLE: Use single Data Type as Default for Underspecified Types
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Avoid introducing a double-precision data type in code generated for a single-precision hardware target.


COMPONENT: simulinkcoder
EXAMPLENAME: TradingDeterminismAndDataIntegrityExample
EXAMPLETITLE: Trade Determinism and Data Integrity to Improve System Performance
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
The differences in the operation modes of the Rate Transition block when used in a multirate, multitasking model. The flexible options for the Rate Transition block allow you to select the mode that is best suited for your application. You can trade levels of determinism and data integrity to improve system performance.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCFuncsThatPassIOArgsAsParamsWFPDataTypeExample
PRODUCT: Fixed-Point Designer;MATLAB;MATLAB Coder;Simulink;Simulink Coder
EXAMPLETITLE:
Integrate External C Functions That Pass Input and Output Arguments as Parameters with a Fixed-Point Data Type

DESCRIPTION:
Integrate legacy C functions that pass their inputs and outputs by using parameters of a fixed-point data type with the Legacy Code Tool.


COMPONENT: simulinkcoder
EXAMPLENAME: FunctionReuseInGeneratedCodeExample
EXAMPLETITLE: Function Reuse in Generated Code
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Configure an atomic subsystem for generating reusable code. To specify that the code generated for a subsystem execute as an atomic unit, on the Block Parameters dialog box, select the Treat as atomic unit parameter. That parameter enables the Function Packaging parameter on the Code Generation tab. The Function Packaging parameter has these four settings:


COMPONENT: simulinkcoder
EXAMPLENAME: RemoveCodeForBlocksNoEffectExample
EXAMPLETITLE: Remove Code for Blocks That Have No Effect on Computational Results
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
The code generator increases execution speed and reduces ROM consumption by removing code that does not impact computational results.


COMPONENT: simulinkcoder
EXAMPLENAME: UseConfigRefRefToSelectCodeGenTargetExample
EXAMPLETITLE: Use Configuration Reference to Select Code Generation Target
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Select a code generation target for a model reference hierarchy without modifying individual models.


COMPONENT: simulinkcoder
EXAMPLENAME: TunePhaseParameterOfSineWaveBlockDuringExecutionExample
EXAMPLETITLE: Tune Phase Parameter of Sine Wave Block During Code Execution
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Under certain conditions, you cannot configure the Phase parameter of a Sine Wave block to appear in the generated code as a tunable global variable (for more information, see the block reference page). This example shows how to generate code so that you can tune the phase during execution.


COMPONENT: simulinkcoder
EXAMPLENAME: SingleRateModelingBareBoardNoOSExample
EXAMPLETITLE: Single-Rate Modeling (Bare Board, No OS)
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Code generation for a single-rate discrete-time model configured for a bare-board target (one with no operating system).


COMPONENT: simulinkcoder
EXAMPLENAME: RemoveCodeForOutofRangeFloatingPointToIntegerConversionsExample
EXAMPLETITLE: Remove Code for Out-of-Range Floating Point to Integer Conversions
PRODUCT: MATLAB;Simulink Coder
DESCRIPTION:
If the input values in your application are in the range of the output type, remove code for out-of-range floating-point to integer conversions.


COMPONENT: simulinkcoder
EXAMPLENAME: ExpressionFoldingExample
EXAMPLETITLE: Fold Expressions
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Expression fold code to minimize the computation of intermediate results at block outputs and the storage of such results in temporary buffers or variables.


COMPONENT: simulinkcoder
EXAMPLENAME: RepresentBlockParameterAsTunableGlobalVariableExample
EXAMPLETITLE: Represent Block Parameter as Tunable Global Variable
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Create tunable parameter data by representing block parameters as global variables in the generated code.


COMPONENT: simulinkcoder
EXAMPLENAME: EfficientCodeByMatchingDataTypesExample
EXAMPLETITLE: Eliminate Unnecessary Typecasts and Shifts by Matching Data Types
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
These examples show how to generate efficient code by configuring a block parameter to use the same data type as a signal that the block operates on.


COMPONENT: simulinkcoder
EXAMPLENAME: DirectLookupTableAlgorithmForRowMajorArrayLayoutExample
EXAMPLETITLE: Direct Lookup Table Algorithm for Row-Major Array Layout
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Simulate and generate code by using the Direct Lookup Table algorithm for row-major and column-major array layout.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCFuncsWithInstSpecificPersistMemExample
EXAMPLETITLE: Integrate External C Functions with Instance-Specific Persistent Memory
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Integrate legacy C functions that use instance-specific persistent memory by using the Legacy Code Tool.


COMPONENT: simulinkcoder
EXAMPLENAME: SFunctionsReusedAcrossModelsExample
EXAMPLETITLE: S-Functions Reused Across Models
PRODUCT: MATLAB;Simulink Coder
DESCRIPTION:
You can place S-functions inside reusable library subsystems. In the S-function file, set both of these flags:


COMPONENT: simulinkcoder
EXAMPLENAME: RelocateCodeAndCustomizePostCodeGenBuildExample
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION: Use the build information programming interface.
EXAMPLETITLE:
Customize Build Process with PostCodeGenCommand and Relocate Generated Code to an External Environment


COMPONENT: simulinkcoder
EXAMPLENAME: MemsetFunctionExample
EXAMPLETITLE: Optimize Generated Code Using memset Function
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
The memset function clears internal storage, regardless of type, to the integer bit pattern 0 (that is, all bits are off).


COMPONENT: simulinkcoder
EXAMPLENAME: PassParameterDataThroughFormalFunctionParametersExample
EXAMPLETITLE: Pass Parameter Data to Referenced Model Entry-Point Functions as Arguments
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Configure a referenced model to accept parameter data through formal parameters of the generated model entry-point function. This technique enables you to specify a different parameter value for each instance (Model block) of the referenced model.


COMPONENT: simulinkcoder
EXAMPLENAME: MultirtMdlngInMultitskngModeBareBoardNoOSExample
EXAMPLETITLE: Multirate Modeling in Multitasking Mode (Bare Board, No OS)
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
The code generated for a multirate discrete-time model configured for a multitasking bare-board target (one with no operating system).


COMPONENT: simulinkcoder
EXAMPLENAME: ConfigGenerateCodeSimulateViewTheTopModelExample
EXAMPLETITLE: Configure Model, Generate Code, and Simulate
PRODUCT: MATLAB;Simulink Coder;Stateflow
DESCRIPTION:
Learn about model functional design, viewing top-level model and subsystems, and running simulations with this example.


COMPONENT: simulinkcoder
EXAMPLENAME: ConfigureDataInterfaceUsingInportsAndOutportsExample
EXAMPLETITLE: Design Data Interface by Configuring Inport and Outport Blocks
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Customize the data interface of a model to enable integration of the generated code with your own code and to improve code traceability and readability.


COMPONENT: simulinkcoder
EXAMPLENAME: InterpolationAlgorithmForRowMajorArrayLayoutExample
EXAMPLETITLE: Interpolation Algorithm for Row-Major Array Layout
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Simulate and generate code by using the interpolation algorithm for row-major and column-major array layout.


COMPONENT: simulinkcoder
EXAMPLENAME: ReplacingTemporaryLocalArraysWithScalarsExample
EXAMPLETITLE: Optimize Generated Code for Complex Signals
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
The code generator performs various optimizations on the structures that represent signals in the generated code.


COMPONENT: simulinkcoder
EXAMPLENAME: GenerateCodeUsingSimulinkCoderExample
EXAMPLETITLE: Generate Code Using Simulink Coder
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Select a system target file for a Simulink model, generate C code for real-time simulation, and view generated files.


COMPONENT: simulinkcoder
EXAMPLENAME: MultirMdlngInSingleTskngModeBareBoardNoOSExample
EXAMPLETITLE: Multirate Modeling in Single-Tasking Mode (Bare Board, No OS)
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
The code generated for a multirate discrete-time model configured for single-tasking on a bare-board target (one with no operating system).


COMPONENT: simulinkcoder
EXAMPLENAME: UseParameterObjectInDifferentDataTypeContextsExample
EXAMPLETITLE: Reuse Parameter Data in Different Data Type Contexts
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Reuse parameter data by creating a Simulink.Parameter object or numeric MATLAB variable that you can use in different data type contexts.


COMPONENT: simulinkcoder
EXAMPLENAME: FloatingPointMultiplicationNetSlopeCorrectionExample
EXAMPLETITLE: Floating-Point Multiplication to Handle a Net Slope Correction
PRODUCT: Fixed-Point Designer;MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
For processors that support efficient multiplication, improve code efficiency by using floating-point multiplication to handle a net slope correction.


COMPONENT: simulinkcoder
EXAMPLENAME: SFunctionsReusedWithinAModelExample
EXAMPLETITLE: S-Functions Reused Within a Model
PRODUCT: MATLAB;Simulink Coder
DESCRIPTION:
By default, S-functions inside a subsystem are not configured for code reuse within a model. You can specify the S-functions inside a subsystem for code reuse within a model. In the S-function file, set the SS_OPTION_WORKS_WITH_CODE_REUSE flag in the ssSetOptions function. This flag indicates that your S-function meets the requirements for subsystem code reuse and is configured for code reuse. If the flag is set and your S-function does not meet the requirements, the code generator does not generate a reusable function and you see a warning.


COMPONENT: simulinkcoder
EXAMPLENAME: ConfigureModelAndGenerateCodeOpenExampleModelExample
EXAMPLETITLE: Open Example Model
PRODUCT: MATLAB;Simulink Coder;Stateflow
DESCRIPTION:
Uses a simple, but functionally complete, example model of a throttle controller. The model features redundant control algorithms. The model highlights a standard model structure and a set of basic blocks in algorithm design.


COMPONENT: simulinkcoder
EXAMPLENAME: ForLoopFusionExample
EXAMPLETITLE: Optimize Generated Code by Combining Multiple for Constructs
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
The code generator uses data dependency analysis to combine for constructs to reduce static code size and runtime branching.


COMPONENT: simulinkcoder
EXAMPLENAME: AddrableSignalsStatesAndParamsExample
EXAMPLETITLE: Access Signal, State, and Parameter Data During Execution
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
As you iteratively develop a model, capture output signal and state data that model execution generates. Tune parameter values during execution to observe results on the outputs.


COMPONENT: simulinkcoder
EXAMPLENAME: UseCondiInputBranchExecutionExample
EXAMPLETITLE: Use Conditional Input Branch Execution
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
For Switch and Multiport Switch blocks, Simulink executes only blocks that compute the control input and the data input that the control input selects.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCFuncsWBlockSampTimeSpecInheritAndParamExample
EXAMPLETITLE: Integrate External C Functions with a Block Sample Time Specified, Inherited, and Parameterized
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions with the block's sample time specified, inherited and parameterized.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCodeUsingCustomCodeBlocksAndConfigParamsExample
PRODUCT: MATLAB;Simulink;Simulink Coder
EXAMPLETITLE:
Integrate External C Code into Generated Code by Using Custom Code Blocks and Model Configuration Parameters

DESCRIPTION:
Place external code in generated code by using custom code blocks and model configuration parameters.


COMPONENT: simulinkcoder
EXAMPLENAME: RemoveCodeThatMapsNaNToIntegerZeroExample
EXAMPLETITLE: Remove Code That Maps NaN to Integer Zero
PRODUCT: MATLAB;Simulink Coder
DESCRIPTION:
If input values of NaN do not exist in your application, specify that the code generator remove code that maps NaN to integer zero.


COMPONENT: simulinkcoder
EXAMPLENAME: InlineInvariantSignalsExample
EXAMPLETITLE: Optimize Generated Code Using Inline Invariant Signals
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Use inline invariant signals to optimize the generated code. This optimization transforms symbolic names of invariant signals into constant values.


COMPONENT: simulinkcoder
EXAMPLENAME: SuppressSharedConstantsInTheGeneratedCodeExample
EXAMPLETITLE: Suppress Shared Constants in the Generated Code
PRODUCT: MATLAB;Simulink Coder;Stateflow
DESCRIPTION:
You can choose whether the code generator produces shared constants and shared functions. You might want to be able to keep the code and data separate between subsystems, or you might find that sharing constants results in a memory shortage during code generation.


COMPONENT: simulinkcoder
EXAMPLENAME: ExampleModelAndLibraryExample
EXAMPLETITLE: Example Model and Library
PRODUCT: MATLAB;Simulink Coder
DESCRIPTION:
To show how to use function interfaces and library-based code generation, this example uses the model LibraryCodeGeneration and library LibraryCodeGenerationLibrary. The model contains two instances of the reusable library subsystem Atomic_Controller. For Atomic_Controller_Single, the input signal data type is single. For Atomic_Controller_Double, the input signal data type is double. To open the model and library files, at the MATLAB command prompt, enter:


COMPONENT: simulinkcoder
EXAMPLENAME: AsynchronousEventModelingViaModelInputsVxWorksROSExample
EXAMPLETITLE: Pass Asynchronous Events in RTOS as Input to a Referenced Model
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Generate code for a model that triggers asynchronous events that get passed as input to a referenced model.


COMPONENT: simulinkcoder
EXAMPLENAME: RowMajorInterpolationAlgoWithSubtableSelectionExample
EXAMPLETITLE: Interpolation with Subtable Selection Algorithm for Row-Major Array Layout
PRODUCT: MATLAB;Simulink;Simulink Coder
DESCRIPTION:
Simulate and generate code by using the interpolation with subtable selection algorithm for row-major and column-major array layout.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCFuncsThatUseStructureArgsExample
EXAMPLETITLE: Integrate External C Functions That Use Structure Arguments
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
Integrate legacy C functions with structure arguments that use Simulink® buses with the Legacy Code Tool.


COMPONENT: simulinkcoder
EXAMPLENAME: ReduceMemConsumpByStoringParamValueInIntTypeExample
EXAMPLETITLE: Reduce Memory Consumption by Storing Parameter Value in Small Data Type
PRODUCT: Fixed-Point Designer;MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
When you use a parameter object (for example, Simulink.Parameter ) to set block parameter values, you can configure the object to appear in the generated code as a tunable global variable. By default, the parameter object and the corresponding global variable typically uses the same data type as the signal or signals on which the block operates. For example, if the input signal of a Gain block uses the data type int16 , the parameter object typically use the same data type. To reduce the amount of memory that this variable consumes, specify that the variable use a smaller integer data type such as int8 .


COMPONENT: simulinkcoder
EXAMPLENAME: CallExternalCFunctionsOpenExampleModelExample
EXAMPLETITLE: Open Example Model
PRODUCT: MATLAB;Simulink Coder;Stateflow
DESCRIPTION:
Create a custom block that calls an external C function. When the block is part of the model, you can take advantage of the simulation environment to test the system further.


COMPONENT: simulinkcoder
EXAMPLENAME: ParamMacroExample
EXAMPLETITLE: Improve Code Readability by Generating Block Parameter Values as Macros
PRODUCT: Embedded Coder;MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
When you generate efficient code by inlining the numeric values of block parameters (with the configuration parameter Default parameter behavior ), you can configure scalar parameters to appear as macros instead of literal numbers. Each macro has a unique name that is based on the name of the corresponding block parameter.


COMPONENT: simulinkcoder
EXAMPLENAME: IntegrateExtCFuncsThatPassIOArgsAsSigsWFPDataTypeExample
PRODUCT: Fixed-Point Designer;MATLAB;MATLAB Coder;Simulink;Simulink Coder
EXAMPLETITLE:
Integrate External C Functions That Pass Input and Output Arguments as Signals with a Fixed-Point Data Type

DESCRIPTION:
Use the Legacy Code Tool to integrate legacy C functions that pass their inputs and outputs by using parameters of fixed-point data type.


COMPONENT: simulinkcoder
EXAMPLENAME: GenerateTunableInitialConditionStructExample
EXAMPLETITLE: Generate Tunable Initial Condition Structure for Bus Signal
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
When you use a MATLAB® structure to specify initialization values for the signal elements in a bus, you can create a tunable global structure in the generated code.


COMPONENT: simulinkcoder
EXAMPLENAME: DeepLearningModelThatPerformsLaneAndVehicleDetectionExample
EXAMPLETITLE: Code Generation for Deep Learning Simulink Model That Performs Lane and Vehicle Detection
PRODUCT: MATLAB;Simulink Coder;Computer Vision Toolbox;Deep Learning Toolbox;Image Processing Toolbox
DESCRIPTION:
This example shows how to generate C++ code from a Simulink® model that performs lane and vehicle detection using convolutional neural networks (CNN).


COMPONENT: simulinkcoder
EXAMPLENAME: GenerateTunableInitialConditionsExample
EXAMPLETITLE: Generate Tunable Initial Conditions
PRODUCT: MATLAB;MATLAB Coder;Simulink;Simulink Coder
DESCRIPTION:
You can represent initial conditions for signals and states by creating tunable global variables in the generated code. These variables allow you to restart an application by using initial conditions that are stored in memory.


COMPONENT: simulinkcompiler
EXAMPLENAME: GenerateAndDeployAMATLABAppForAModelExample
EXAMPLETITLE: Generate and Deploy a MATLAB App with SimAppTemplate for a Model
PRODUCT: MATLAB;Simulink Compiler;Simulink
DESCRIPTION:
Use the simulink.compiler.genapp function to generate a MATLAB® app for a model, that is deployable. Typically when a Simulink® model is functionally complete, it is often used to run multiple simulations different input and parameter values. To try simulations for your model with different input and parameter values, you can generate a MATLAB App. You can also deploy this generated app for use outside of MATLAB.


COMPONENT: simulinkcompiler
EXAMPLENAME: DeployAnAppWithLiveSimulationResultsOfLorenzSystemExample
EXAMPLETITLE: Deploy App with Live Simulation Results of Lorenz System
PRODUCT: Simulink Compiler;Simulink;MATLAB
DESCRIPTION:
Develop an app that uses callbacks for simulation inputs and outputs to view the simulation of a Simulink® model of the Lorenz system. You can then deploy the app with Simulink Compiler™.


COMPONENT: simulinkcompiler
EXAMPLENAME: ExportSimulinkModelToStandaloneFMUExample
EXAMPLETITLE: Export Simulink Model to Standalone FMU
PRODUCT: MATLAB;Simulink Compiler
DESCRIPTION:
Export Simulink® component to standalone Co-Simulation FMU 2.0 with Simulink Compiler™. For a detailed explanation of the model, see:


COMPONENT: simulinkcompiler
EXAMPLENAME: ExportStandaloneFMUWithExternalCCodeExample
EXAMPLETITLE: Export Standalone FMU with External C++ Code
PRODUCT: MATLAB;Simulink Compiler
DESCRIPTION:
Import external C++ code into Simulink® model using S-Function Builder and export it to a standalone FMU. S-Function Builder block lets user import C/C++ code into Simulink Semantic by building an S-function wrapper for external code. This example demonstrates this process in a phased approach by implementing a C++ multiply class, integrating C++ code with S-Function Builder, and exporting the model as a standalone FMU.


COMPONENT: simulinkcompiler
EXAMPLENAME: ExportSimulinkModelToStandaloneFMUWithSourceCodeExample
EXAMPLETITLE: Export Simulink Model to Standalone FMU with Source Code
PRODUCT: MATLAB;Simulink Compiler;MATLAB Coder;MATLAB Compiler;Simulink Coder
DESCRIPTION:
Export Simulink® component to standalone Co-Simulation FMU 2.0 with source code using Simulink Compiler™ and Simulink Coder™. The source code is packed inside the sources folder of the Standalone FMU. A documentation file, index.html is also generated. It lists the steps to regenerate the binaries on another platform. This documentation file is located inside documentation folder of the Standalone FMU. The source code can be used for cross platform workflow.


COMPONENT: simulinkcompiler
EXAMPLENAME: ExportSimulinkModelToStandaloneFMUWithUserSpecifiedFilesExample
PRODUCT: MATLAB;Simulink Compiler
EXAMPLETITLE:
Export Simulink Model to Standalone FMU with User Specified Files and Archived Project with Harness Model

DESCRIPTION:
Export Simulink® component to standalone Co-Simulation FMU 2.0 with user specified documentation and harness model using Simulink Compiler™. This example demonstrate following features of Standalone FMU Export: User file packing.


COMPONENT: simulinkcompiler
EXAMPLENAME: EliminateDelayInCSFMUUsingEventModeExample
EXAMPLETITLE: Eliminate Single Step Delay in Co-Simulation FMU Using Event Mode
PRODUCT: MATLAB;Simulink Compiler
DESCRIPTION:
A functional mockup unit (FMU) exhibits a single step delay of output in Simulink® when it is used in co-simulation mode. This is due to the delay in communication between the local FMU solver and Simulink solver. This example shows how to export a Simulink model to a standalone co-simulation FMU that is compatible with FMI 3.0 standard and leverage the event mode of the FMU in Simulink to eliminate the single step delay caused during co-simulation. This method works for FMUs that were created from a Simulink model and contain only direct feedthrough blocks.


COMPONENT: simulinkcompiler
EXAMPLENAME: DeployingASimulationAppUsingSimulinkCompilerExample
EXAMPLETITLE: Deploying a Simulation App with Simulink Compiler
PRODUCT: MATLAB;Simulink Compiler;Simulink
DESCRIPTION:
In this example, we use an app that is prepared in the App Designer and deploy it with Simulink® Compiler™.


COMPONENT: simulinkcompiler
EXAMPLENAME: ExportSimulinkModelWithPMAndFMUToStandaloneFMUExample
EXAMPLETITLE: Export Simulink Model with Protected Model and FMU Import Block to Standalone FMU
PRODUCT: MATLAB;Simulink Compiler
DESCRIPTION:
Export a Simulink® model with external references to Standalone FMU. In this example, the model f14_flight_control demonstrates exporting protected model and FMU Import block to a Standalone FMU.


COMPONENT: simulinktest
EXAMPLENAME: DeleteTestSeqSymbolAPIExample
EXAMPLETITLE: Delete a Test Sequence Symbol Programmatically
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Delete a data symbol programmatically from a Test Sequence block. The data symbol DurationLimit is a constant.


COMPONENT: simulinktest
EXAMPLENAME: GetAssessmentsProgrammaticExample
EXAMPLETITLE: Get Assessments from a Simulation
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Simulate a model with verify statements and obtain assessment results via the programmatic interface.


COMPONENT: simulinktest
EXAMPLENAME: TestSequenceMessagesExample
EXAMPLETITLE: Use Messages in Test Sequences
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Messages carry data between Test Sequence blocks and other blocks such as Stateflow® charts. Messages can be used to model asynchronous events. A message is queued until you evaluate it, which removes it from the queue. You can use messages and message data inside a test sequence. The message remains valid until you forward it, or the time step ends. For more information, see Messages (Stateflow) in the Stateflow® documentation.


COMPONENT: simulinktest
EXAMPLENAME: BasicSLTestMLUnitWorkflowExample
EXAMPLETITLE: Basic Workflow Using MATLAB® Unit Test
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create and run a basic MATLAB® Unit Test for a test file created in Simulink® Test™. You create a test suite, run the test, and display the diagnostic report.


COMPONENT: simulinktest
EXAMPLENAME: ObservePIDInsideAnFMUUsingAndObserverExample
EXAMPLETITLE: Observe Internal Variables to Tune PID Controller Inside an FMU
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
In this system, the PID controller calculates the force that needs to be exerted on the mass to control its position. The Observer blocks allows you to tune the PID controller by providing wireless access to the control input and tracking errors that are configured as internal variables.


COMPONENT: simulinktest
EXAMPLENAME: CreateBaselineTestForModelRefPgExample
EXAMPLETITLE: Create Baseline Test for a Model
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create a baseline test case for the vdp model and save the inputs in an Excel file. A test harness is created automatically.


COMPONENT: simulinktest
EXAMPLENAME: AddMicrosoftExcelDataAsInputExample
EXAMPLETITLE: Add Microsoft® Excel® Data as Input
PRODUCT: MATLAB;Simulink Test;Stateflow;Simulink
DESCRIPTION:
Add data from a Microsoft® Excel® spreadsheet and map it to a test case. Only the two sheets that have data are added and mapped.


COMPONENT: simulinktest
EXAMPLENAME: AuthorVerifyStatementsExample
EXAMPLETITLE: Author verify Statements
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
When you use verify statements to evaluate logical expressions, the verify statement returns a pass, fail, or untested result for each time step and for the overall simulation. A fail result at any time step results in a fail result for the overall simulation. If there are no failing results, a pass at any time step results in an pass result for the overall simulation. Otherwise, the overall result is untested.


COMPONENT: simulinktest
EXAMPLENAME: CreateInputFileTemplateForSignalDataExample
EXAMPLETITLE: Create Input File Template for Signal Data
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create an input file template for a test case, using the Excel® file format. Name the sheet for the template Optics. Creating the file also adds it as input in the test case. After you create the file, edit it to populate it with signal data..


COMPONENT: simulinktest
EXAMPLENAME: CreateANewTestStepExample
EXAMPLETITLE: Create a New Test Step
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Creates a test step, step1 , in a Test Sequence block after the step SetLowPhi , which is in the second level of hierarchy under the top-level step APEngagement_AttitudeLevels .


COMPONENT: simulinktest
EXAMPLENAME: CreateEquivTestForComponentRefPgExample
EXAMPLETITLE: Create Equivalence Test for a Component
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create an equivalence (back-to-back) test case for the Controller component of the sltestNormalSILEquivalenceExample model.


COMPONENT: simulinktest
EXAMPLENAME: GenerateATestSpecificationReportExample
EXAMPLETITLE: Generate a Test Specification Report
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Generate a PDF report that uses the default template. This example reports on test cases from the test file of the AutopilotTestFile model. The report specifies the test author and report title. It excludes custom criteria from the report and launches the report after it is generated. Other properties default to true and thus, their information is included in the report.


COMPONENT: simulinktest
EXAMPLENAME: ActivateVerifyStatementsTestAssessmentBlockExample
EXAMPLETITLE: Activate verify Statements in the Test Assessment Block
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
In a When decomposition sequence, steps activate based on a simulation condition. You can use a When decomposition sequence in a Test Assessment block to define the simulation condition that activates a step containing a verify statement:


COMPONENT: simulinktest
EXAMPLENAME: TransmissionDownshiftTestSequenceExample
EXAMPLETITLE: Test Downshift Points of a Transmission Controller
PRODUCT: MATLAB;Simulink;Simulink Test;Stateflow
DESCRIPTION:
Demonstrates how to test a transmission shift logic controller using test sequences and test assessments.


COMPONENT: simulinktest
EXAMPLENAME: SetHarnessOptionsWhenCreatingATestCaseExample
EXAMPLETITLE: Set Harness Options When Creating a Test Case
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Create a test case and test harness for a model component. It also shows how to use the HarnessOptions property. The test case uses only a component harness and is set up with no inputs or baseline strategy. To use this test case creation strategy, the UseComponentInputs property of createTestForComponent function must be false, and the SLDVTestGeneration property must be off. The HarnessSource property is ignored and the FunctionInterfaceName is deduced from the argument passed to createTestForComponent.


COMPONENT: simulinktest
EXAMPLENAME: TestCaseMATLABUnitTestExample
EXAMPLETITLE: Test a Model for Continuous Integration Systems
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Test a model, publish Test Manager results, and output results in TAP format with a single execution.


COMPONENT: simulinktest
EXAMPLENAME: HarnessModelComponentComparisonExample
EXAMPLETITLE: Compare Component Under Test Between Model and Harness
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Compare a component under test between the main model and the test harness. Comparing the component under test can help you determine if the CUT contains unsynchronized changes.


COMPONENT: simulinktest
EXAMPLENAME: UseAPIToRunTestFileInTestManagerExample
EXAMPLETITLE: Use API Commands to Run a Test File in the Test Manager
PRODUCT: MATLAB;Simulink Test;Parallel Computing Toolbox
DESCRIPTION:
Use sltest.testmanager.run to run a test file in the Test Manager. A simulation test case runs on the sldemo_autotrans model


COMPONENT: simulinktest
EXAMPLENAME: OutputTriggerResultsExample
EXAMPLETITLE: Get Iteration Output Trigger Results
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Get output trigger results for an iteration. The test file has iterations and has a duration trigger set to start at 5 seconds after simulation starts and end at the end of simulation.


COMPONENT: simulinktest
EXAMPLENAME: StateflowChartAsTestHarnessSchedulerAndSourceExample
EXAMPLETITLE: Stateflow Chart as Test Harness Scheduler and Source
DESCRIPTION: Use Stateflow chart to define test sequence and inputs.
PRODUCT:
MATLAB;Simulink Test;Simulink;Stateflow;Simulink Coverage;Simulink Design Verifier;Embedded Coder;Requirements Toolbox;Simscape


COMPONENT: simulinktest
EXAMPLENAME: RegisterAnExcelAdapterExample
EXAMPLETITLE: Register an Excel Adapter
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Use and register a function that converts the formatting of an Excel spreadsheet so it can be used in the Test Manager. The spreadsheet has 6 sheets, each corresponding to an iteration. Each sheet has a header with the iteration name and description. The sheets also include the built-in formats for specifying test inputs, parameters, and baselines. This examples uses the CruiseContol model.


COMPONENT: simulinktest
EXAMPLENAME: TestStepAddEditTransitionExample
EXAMPLETITLE: Add and Edit a Test Step Transition
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Adds a transition to a test step, then changes the transition's index, condition, and next step of the first transition in the step.


COMPONENT: simulinktest
EXAMPLENAME: AddTriggersToATestCaseExample
EXAMPLETITLE: Add Triggers to a Test Case
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Add triggers to a test case by using the Test Manager. The triggers start logging output data when the Ww output signal is greater than 40 and stop logging output data after 4 seconds.


COMPONENT: simulinktest
EXAMPLENAME: CloneAndExportTestHarnessExample
EXAMPLETITLE: Clone and Export a Test Harness to a Separate Model
PRODUCT: MATLAB;Simulink;Simulink Test
DESCRIPTION:
Demonstrates cloning an existing test harness and exporting the cloned harness to a separate model. This can be useful if you want to create a copy of a test harness as a separate model, but leave the test harness associated with the model component.


COMPONENT: simulinktest
EXAMPLENAME: ModelVerificationBlocksOutputExample
EXAMPLETITLE: Examine Model Verification Results by Using Simulation Data Inspector
PRODUCT: MATLAB;Simulink Design Verifier;Simulink Test
DESCRIPTION:
Use the Simulation Data Inspector to view the output from a model verification block in a system under test. If you have Simulink® Test™, model verification blocks return Pass , Fail , or Untested results at each time step. By examining the results of a model verification block, you can:


COMPONENT: simulinktest
EXAMPLENAME: EditTestSeqSymbolExample
EXAMPLETITLE: Find, read, and edit a Test Sequence block data symbol
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Edits constant DurationLimit in the Test Sequence block, changing it to a local variable of single data type.


COMPONENT: simulinktest
EXAMPLENAME: MCovReportPropMATLABUnitExample
EXAMPLETITLE: Set Model Coverage Report Properties for MATLAB Unit Test
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Specify model coverage report properties when running a Simulink® Test™ test file with MATLAB® Unit Test.


COMPONENT: simulinktest
EXAMPLENAME: TestHarnessCallbackExample
EXAMPLETITLE: Test Harness Callback Example
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Use a post-create callback to customize a test harness. The callback changes one harness source from an Inport block to Constant block and enables signal logging in the test harness.


COMPONENT: simulinktest
EXAMPLENAME: HarnessParameterUpdateExample
EXAMPLETITLE: Check Component and Push Parameter to Main Model
PRODUCT: MATLAB;Simulink Test;Stateflow;Simulink
DESCRIPTION:
A basic workflow of updating a parameter in a test harness, checking the synchronization between the test harness and main model, and pushing the parameter change from the test harness to the main model.


COMPONENT: simulinktest
EXAMPLENAME: CreateANewTestStepBeforeExample
EXAMPLETITLE: Create a New Test Step
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Creates a test step, step1 , in a Test Sequence block before the step SetLowPhi , which is in the second level of hierarchy under the top-level step APEngagement_AttitudeLevels .


COMPONENT: simulinktest
EXAMPLENAME: APITestHarnessImportExample
EXAMPLETITLE: Programmatically Create a Test Harness from a Standalone Model
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Use sltest.harness.import to create a test harness by importing a standalone verification model. You create a test harness for a basic cruise control subsystem.


COMPONENT: simulinktest
EXAMPLENAME: ProgrammaticallyCreateTestSequenceExample
EXAMPLETITLE: Programmatically Create a Test Sequence
PRODUCT: MATLAB;Simulink Test;Stateflow;Simulink
DESCRIPTION:
Create a test harness and test sequence using the programmatic interface. You create a test harness and a Test Sequence block, and author a test sequence to verify two functional attributes of a cruise control system.


COMPONENT: simulinktest
EXAMPLENAME: ObtainTestCaseResultsExample
EXAMPLETITLE: Obtain Test Case Results
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create a test file, test suite, and simulation test case programmatically. It also show how to obtain the results. The test case runs on the HeatPumpScenario model.


COMPONENT: simulinktest
EXAMPLENAME: TestManagerResultsPluginExample
EXAMPLETITLE: Include Test Manager Results in MATLAB Unit Test Results
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Include Test Manager Results in a TestResult object produced using the MATLAB Unit Test framework. The results are stored in a TestResultContainer object.


COMPONENT: simulinktest
EXAMPLENAME: CustomizeTestResultsReportExample
EXAMPLETITLE: Example of Customized Test Results Report
PRODUCT: MATLAB;Simulink Test;Simulink;Simulink Report Generator
DESCRIPTION:
Customize a test results report by using a custom class, a custom template file, or a combination of both.


COMPONENT: simulinktest
EXAMPLENAME: VerifyHeatPumpTemperatureByUsingObserversExample
EXAMPLETITLE: Verify Heat Pump Temperature by Using Observers
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Use an Observer Reference block to wirelessly observe signals and verify results. In this system, the plant is modeled using Simulink, and the controller is modeled using Stateflow. The goal of the example is to monitor both the temperature of the heat pump and when the pump is cooling or heating the room. The direction in which the fan is blowing indicates cooling or heating. The data name is pump_dir, and it is connected to port 3 in the Stateflow chart.


COMPONENT: simulinktest
EXAMPLENAME: AssessTheDampingRatioOfAFlutterSuppressionSystemExample
EXAMPLETITLE: Assess the Damping Ratio of a Flutter Suppression System
DESCRIPTION: Verify wing oscillation damping for altitude and airspeed conditions.
PRODUCT:
MATLAB;Simulink Test;Aerospace Blockset;Simulink;Simscape;Simscape Multibody;Signal Processing Toolbox


COMPONENT: simulinktest
EXAMPLENAME: GetVerifyOutputFromTestCaseExample
EXAMPLETITLE: Get Verify Output From Test Case
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Obtain the verify statement dataset from a test case result and view the assessment results. You use verify statements in the Test Sequence or Test Assessment blocks in the system under test. You can use the output, which is an array of objects, with Simulink.sdi.Run.


COMPONENT: simulinktest
EXAMPLENAME: BatchUnitLevelEquivalenceTestingOfMultipleComponentsExample
EXAMPLETITLE: Batch Equivalence Testing of Multiple Components
DESCRIPTION: Create test cases and test harnesses for multiple components at the same time.
PRODUCT:
MATLAB;Simulink Test;Embedded Coder;Simulink Coverage;Simulink;Simulink Design Verifier;Simulink Report Generator


COMPONENT: simulinktest
EXAMPLENAME: ObtainTestCaseThatProducedResultExample
EXAMPLETITLE: Obtain Test Case That Produced Result
PRODUCT: MATLAB;Simulink Test
DESCRIPTION:
Create a test file, test suite, and simulation test case programmatically. The test case runs on the HeatPumpScenario model and uses getTestCase to obtain the test case that produced the test results.


COMPONENT: simulinktest
EXAMPLENAME: GenerateAndImportTestCasesFromSLDVExample
EXAMPLETITLE: Generate and Import Test Cases From Simulink Design Verifier
PRODUCT: MATLAB;Simulink Test;Simulink Design Verifier
DESCRIPTION:
Open the sldvdemo_cruise_control model. Set the option to generate the test. Then, use sldvrun to generate the Simulink Design Verifier data file. Import the Simulink Design Verifier data so it is usable by Simulink Test.


COMPONENT: simulinktest
EXAMPLENAME: GenerateACustomTestSpecReportExample
EXAMPLETITLE: Generate a Customized Test Specification Report
PRODUCT: MATLAB;Simulink Test;Simulink;Simulink Report Generator
DESCRIPTION:
Create a custom test case template. After you edit the template as desired, use that template when generating the report. Examples of edits to the custom template include reordering the report sections and changing the report fonts. This example shows how to generate a customized TestCaseReporter. Generating a customized TestSuiteReporter template is similar and is used to generate both Test Suite and Test File report sections. Customizing templates requires MATLAB Report Generator and Simulink Report Generator licenses.


COMPONENT: simulinktest
EXAMPLENAME: OverrideSimulationModeDuringTestExecutionExample
EXAMPLETITLE: Override the Simulation Mode During Test Execution
PRODUCT: MATLAB;Simulink Test;Simulink
DESCRIPTION:
Override the simulation mode when you run a test. You can run a test in a simulation mode without modifying the simulation mode specified in the test case or the model settings.


COMPONENT: simulinktest
EXAMPLENAME: MergeCoverageResultsExample
EXAMPLETITLE: Merge Coverage Results
PRODUCT: MATLAB;Simulink Test;Simulink Coverage
DESCRIPTION:
Merge coverage results from two test result sets. One test is a baseline test and the other test is an equivalence test. The MergeCoverage.mldatx test file, which has predefined test suites and test cases, is provided.


COMPONENT: sl3d
EXAMPLENAME: CreateCylinderActorFromShapeExample
EXAMPLETITLE: Build Actor from 3D Graphic Primitives Using Simulink
PRODUCT: MATLAB;Simulink 3D Animation;Simulink
DESCRIPTION:
Create an actor from a 3D graphic primitive shape in the Unreal Engine visualization environment using Simulink .


COMPONENT: sl3d
EXAMPLENAME: AnimateBouncingBallExample
EXAMPLETITLE: Simulate Actor with Gravity Property Using Simulink
PRODUCT: MATLAB;Simulink 3D Animation;Simulink
DESCRIPTION:
Visualize the 3D simulation of actors with gravity and physics properties in the Unreal Engine simulation environment using Simulink .


COMPONENT: sl3d
EXAMPLENAME: SimulateActorMovementUsingSimulinkExample
EXAMPLETITLE: Simulate Actor Movement Using Simulink
PRODUCT: Simulink 3D Animation;Simulink;Computer Vision Toolbox
DESCRIPTION:
Control an actor in the Unreal Engine visualization environment using Simulink , and capture the actor image from the 3D environment using a camera sensor.


COMPONENT: sl3d
EXAMPLENAME: CreateActorInWorldSceneExample
EXAMPLETITLE: Create World and Actor Using Simulink
PRODUCT: MATLAB;Simulink 3D Animation;Simulink
DESCRIPTION:
Use Simulink to create a 3D environment and an actor object in the Unreal Engine visualization environment.


COMPONENT: sl3d
EXAMPLENAME: AnimateCubeActorExample
EXAMPLETITLE: Simulate Actor with Kinematics Properties Using Simulink
PRODUCT: Simulink 3D Animation;Simulink
DESCRIPTION:
Visualize actor simulation with kinematic properties such as linear and angular velocity in the Unreal Engine simulation environment using Simulink .


COMPONENT: slcheck
EXAMPLENAME: EnableSubsystemReuseWithCloneExample
EXAMPLETITLE: Identify Modeling Clones with the Metrics Dashboard
PRODUCT: MATLAB;Simulink;Simulink Check
DESCRIPTION:
You can use the Metrics Dashboard tool to enable subsystem reuse by identifying exact graphical clones across a model hierarchy.


COMPONENT: slcheck
EXAMPLENAME: CreateMetricForNonvirtualBlockCountExample
EXAMPLETITLE: Create a Custom Model Metric for Nonvirtual Block Count
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
Create a new model metric by using the slmetric.metric.createNewMetricClass function and defining the metric algorithm.


COMPONENT: slcheck
EXAMPLENAME: DefineASimulationTimeWindowExample
EXAMPLETITLE: Define a Simulation Time Window
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
You can refine a highlighted model to include only those blocks used in a portion of a simulation time window. Defining the simulation time window holds some switch blocks constant, and as a result removes inactive inputs.


COMPONENT: slcheck
EXAMPLENAME: IdentifyDataTypeMatchwithLibraryCloneDetectionExample
EXAMPLETITLE: Identify Data Type Match with Library Clone Detection
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Programmatically detect clones and determine whether the inport data types of the library subsystem matches the inport data types of the clones in a model. For more information about Clone Detection APIs, see Detect and Replace Subsystem Clones Programmatically.


COMPONENT: slcheck
EXAMPLENAME: MergeInterpolationUsingPrelookupBlocksExample
EXAMPLETITLE: Merge Interpolation Using Prelookup Blocks Using the Model Transformer App
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Use the Model Transformer to identify redundant Interpolation Using Prelookup blocks, and then refactor the model.


COMPONENT: slcheck
EXAMPLENAME: HighlightingTimeIntervalsOfAStateflowStateOrTransitionExample
EXAMPLETITLE: Highlighting the Active Time Intervals of a Stateflow® State or Transition
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
The slslicer_fuelsys_activity_slicing model contains a fault-tolerant fuel control system. In this tutorial, you use activity-based time slicing to refine a model highlight to only those time intervals in which certain states and transitions are active. You must be familiar with how to highlight functional dependencies by using Model Slicer.


COMPONENT: slcheck
EXAMPLENAME: CollectMetricDataProgramViewMetricsDbdExample
EXAMPLETITLE: Collect Metric Data Programmatically and View Data Through the Metrics Dashboard
PRODUCT: MATLAB;Simulink;Simulink Check
DESCRIPTION:
Use the model metrics API to collect model metric data for your model, and then explore the results by using the Metrics Dashboard.


COMPONENT: slcheck
EXAMPLENAME: HighlightFunctionalDependenciesExample
EXAMPLETITLE: Highlight Functional Dependencies
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
Use Model Slicer to highlight functional dependencies and refine the highlighted portion of your model using constraints and exclusions.


COMPONENT: slcheck
EXAMPLENAME: UseMACEToCreateCustomMAConfigExample
EXAMPLETITLE: Use the Model Advisor Configuration Editor to Create a Custom Model Advisor Configuration
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Demonstrates how to create a configuration for the Model Advisor by using the Model Advisor Configuration Editor.


COMPONENT: slcheck
EXAMPLENAME: CollectComplianceMetricsAndExploreResultsInModelAdvisorExample
EXAMPLETITLE: Collect Compliance Data and Explore Results in the Model Advisor
PRODUCT: MATLAB;Simulink;Simulink Check
DESCRIPTION:
Collect model metric data by using the Metrics Dashboard and explore detailed compliance results and, fix compliance issues by using the Model Advisor.


COMPONENT: slcheck
EXAMPLENAME: ImproveModelReadabilityByEliminatingLocalDataStoreBlockExample
EXAMPLETITLE: Improve Model Readability by Eliminating Local Data Store Blocks Using Model Transformer
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
The model data_store_elimination contains the two local data stores: B and A . For data store B , there are two Data Store Read blocks and one Data Store Write block. For data store A , there is one Data Store Write block and one Data Store Read block. The red numbers represent the sorted execution order.


COMPONENT: slcheck
EXAMPLENAME: CreateCustomCheckForGeneratedCodeInAVariantSystemExample
EXAMPLETITLE: Create Custom Check to Evaluate Active and Inactive Variant Paths from a Model
PRODUCT: Embedded Coder;MATLAB;Simulink;Simulink Check
DESCRIPTION:
An example of a custom Model Advisor check that evaluates active and inactive variant paths from a variant system model.


COMPONENT: slcheck
EXAMPLENAME: ProgrammaticallyResolveUnexpectedBehaviorWithModelSlicerExample
EXAMPLETITLE: Programmatically Resolve Unexpected Behavior in a Model with Model Slicer
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
Detect unexpected behavior, and use Model Slicer to programmatically isolate and resolve the unexpected behavior.


COMPONENT: slcheck
EXAMPLENAME: ImproveEfficiencyOfSimulationByOptimizingPrelookupOpExample
PRODUCT: MATLAB;Simulink Check
EXAMPLETITLE:
Improve Efficiency of Simulation by Optimizing Prelookup Operation of Lookup Table Blocks Using Model Transformer

DESCRIPTION:
Use Model Transformer to identify Lookup Table blocks that qualify for transformation and replacing them with Interpolation blocks and shared Prelookup blocks.


COMPONENT: slcheck
EXAMPLENAME: CreateAndDeployAModelAdvisorCustomConfigurationExample
EXAMPLETITLE: Create and Deploy Model Advisor Custom Configuration
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Demonstrates how to add custom checks to the Model Advisor and remove shipping checks that you do not require.


COMPONENT: slcheck
EXAMPLENAME: RunCloneDetectionProgrammaticallyInALoopOnMultipleModelsExample
EXAMPLETITLE: Detect and Replace Clones Programmatically in a Loop on Multiple Models
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Programmatically detect and replace clones on multiple models in a loop by operating on models individually. For more information about Clone Detection APIs, see Detect and Replace Subsystem Clones Programmatically.


COMPONENT: slcheck
EXAMPLENAME: ExclusionsAtLineHsExample
EXAMPLETITLE: Exclusions at LineHs
PRODUCT: MATLAB;Simulink Check
DESCRIPTION:
Handles of line that connects from the Inport block to the Outport block. To get the Line Handle, use get_param command.


COMPONENT: slcheck
EXAMPLENAME: CollectModelMetricsProgrammaticallyExample
EXAMPLETITLE: Collect Model Metrics Programmatically
PRODUCT: MATLAB;Simulink Check;Simulink
DESCRIPTION:
Use the model metric API to programmatically collect metrics for a model, such as subsystem and block counts.


COMPONENT: slci
EXAMPLENAME: IncludeCustomDataInCodeInspectionReportExample
EXAMPLETITLE: Incorporate Custom Information in Code Inspection Report
PRODUCT: MATLAB;Simulink Code Inspector;Embedded Coder
DESCRIPTION:
Review workflow on how to generate customized code inspection report that contains custom information.


COMPONENT: slci
EXAMPLENAME: IntroductionToSimulinkCodeInspectorExample
EXAMPLETITLE: Inspect Code Generated From Model Programmatically
PRODUCT: Embedded Coder;MATLAB;Simulink Code Inspector
DESCRIPTION:
Use the Simulink® Code Inspector™ to verify the code generated from models and satisfy source code objectives from DO-178C, Software Considerations in Airborne Systems and Equipment Certification. You can verify the generated code both programmatically by using MATLAB commands and graphically by using the Code Inspector app. This example shows how to verify code programmatically. It illustrates how to:


COMPONENT: slci
EXAMPLENAME: DisableInspectionOfIncompatibleUserdefinedMFExample
EXAMPLETITLE: Disable Inspection for Noninline Functions Defined in MATLAB Functions Blocks
PRODUCT: MATLAB;Simulink Code Inspector
DESCRIPTION:
Disable inspection of noninlined functions generated from incompatible user-defined MATLAB functions.


COMPONENT: slci
EXAMPLENAME: InspectCCodeGeneratedFromSimulinkModelsExample
EXAMPLETITLE: Inspect C++ Code Generated From Simulink Models
PRODUCT: MATLAB;Simulink Code Inspector;Embedded Coder
DESCRIPTION:
Inspect C++ code generated from a Simulink model of a simple helicopter control system to verify code review objectives in DO-178. You can choose to generate code interface that encapsulates model data into class attributes and model entry-point functions as C++ class methods. After code inspection, you can review the inspection results using model-to-code and code-to-model traceability.


COMPONENT: slci
EXAMPLENAME: DisableInspectionOfNoninlinedMATLABFunctionsExample
EXAMPLETITLE: Disable Inspection of Noninlined MATLAB Functions
PRODUCT: MATLAB;Simulink Code Inspector;Embedded Coder
DESCRIPTION:
Uses the slcidemo_noninline_func_verification model, which is present in your current working folder. The model contains two MATLAB Function blocks, each of which includes a user-defined function. These functions are configured to be nonreusable and noninlined.


COMPONENT: slcontrol
EXAMPLENAME: ComputeOPFromOutputSpecificationsAtCommandLineExample
EXAMPLETITLE: Compute Operating Points from Specifications at the Command Line
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Find steady-state operating points that meet specifications by trimming your Simulink model at the command line.


COMPONENT: slcontrol
EXAMPLENAME: RemoveAllAnalysisPointsExample
EXAMPLETITLE: Remove All Analysis Points
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create an slLinearizer interface for the scdcascade model. Add analysis points for the r, e1, and y1m signals.


COMPONENT: slcontrol
EXAMPLENAME: ComputeOpenLoopResponseAtTheCommandLineExample
EXAMPLETITLE: Compute Open-Loop Response at the Command Line
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Compute a linear model of the combined controller-plant system without the effects of the feedback signal. You can analyze the resulting linear model using, for example, a Bode plot.


COMPONENT: slcontrol
EXAMPLENAME: BatchLinearizeModelforParameterValueVariationsUsinglineaExample
EXAMPLETITLE: Batch Linearize Model for Parameter Variations at Single Operating Point
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Vary model parameters and linearize a model at its nominal operating conditions using the linearize command.


COMPONENT: slcontrol
EXAMPLENAME: BatchLinearizeModelatMultipleOperatingPointsUsinglineariExample
EXAMPLETITLE: Batch Linearize Model at Multiple Operating Points Using linearize Command
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
You can linearize your model at multiple trimmed operating points or for multiple simulation snapshots.


COMPONENT: slcontrol
EXAMPLENAME: ExamineEstimationResultsUsingSimulationResultsViewerExample
EXAMPLETITLE: Examine Estimation Results Using Simulation Results Viewer
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
The Simulation Results Viewer lets you examine the results of frequency response estimation frequency by frequency. You open the viewer using the frest.simView command. To do so, store the simulation data using the simout output argument of frestimate .


COMPONENT: slcontrol
EXAMPLENAME: ObtainLoopTransferFunctionforSpecificParameterCombinatioExample
EXAMPLETITLE: Obtain Loop Transfer Function for Specific Parameter Combination
PRODUCT: MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Suppose you batch linearize the scdcascade model for multiple transfer functions. For most linearizations, you vary the proportional ( Kp2 ) and integral gain ( Ki2 ) of the C2 controller, in the 10% range. For this example, calculate the loop transfer function for the inner loop at e2 for the maximum values of Kp2 and Ki2 .


COMPONENT: slcontrol
EXAMPLENAME: EvaluateFrequencyResponseEstimationInTimeDomainExample
EXAMPLETITLE: Compare Simulated Model and Linear Model in Time Domain
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
frest.simCompare lets you lets you examine the results of frequency response estimation in the time domain. You can compare the simulated model response to the response of a linear model of the system, such as one obtained by exact linearization.


COMPONENT: slcontrol
EXAMPLENAME: GetRateConversionSettingsOfTunedPIDBlockExample
EXAMPLETITLE: Get Rate Conversion Settings of Tuned PID Block
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create an slTuner interface for the Simulink model scdcascade . Examine the block rate conversion settings of one of the tuned blocks.


COMPONENT: slcontrol
EXAMPLENAME: GainScheduledControllerAutotuningWorkflowExample
EXAMPLETITLE: Tune Gain-Scheduled Controller Using Closed-Loop PID Autotuner Block
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Use Closed-Loop PID Autotuner block to tune gain-scheduled PID controller for a water-tank model in one simulation.


COMPONENT: slcontrol
EXAMPLENAME: FrequencyResponseEstimationUsingSimulationExample
EXAMPLETITLE: Frequency Response Estimation Using Simulation-Based Techniques
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Obtain the frequency response of your model when analytical linearization does not provide accurate results due to event-based dynamics in the linearization path.


COMPONENT: slcontrol
EXAMPLENAME: BoostConverterFREUsingPRBSExample
EXAMPLETITLE: Frequency Response Estimation for Power Electronics Model Using Pseudorandom Binary Signal
PRODUCT: MATLAB;Simulink Control Design;Simulink;Simscape Electrical
DESCRIPTION:
Identify a frequency-domain model for a high-frequency power electronics system using a PRBS input signal at command line.


COMPONENT: slcontrol
EXAMPLENAME: MoreEfficientBatchLinearizationVaryingParametersExample
EXAMPLETITLE: More Efficient Batch Linearization Varying Parameters
PRODUCT: MATLAB;Simulink Control Design;Aerospace Blockset
DESCRIPTION:
There are several methods for speeding up the batch linearization of a model when a set of model parameters are varied.


COMPONENT: slcontrol
EXAMPLENAME: AntiLockBrakingUsingExtremumSeekingControlExample
EXAMPLETITLE: Anti-Lock Braking Using Extremum Seeking Control
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Design an extremum seeking controller that maximizes the friction coefficient of an ABS system to achieve the shortest stopping distance.


COMPONENT: slcontrol
EXAMPLENAME: ObtainClosedLoopTransferFunctionfromReferencetoPlantOutpExample
EXAMPLETITLE: Obtain Closed-Loop Transfer Function from Reference to Plant Output
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Obtain the closed-loop transfer function from the reference signal, r , to the plant output, y , for the ex_scd_simple_fdbk model.


COMPONENT: slcontrol
EXAMPLENAME: OnlineFrequencyResponseEstimationDuringSimulationExample
EXAMPLETITLE: Online Frequency Response Estimation During Simulation
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Perform online frequency response estimation during model simulation using the Frequency Response Estimator block.


COMPONENT: slcontrol
EXAMPLENAME: OnlineFrequencyResponseEstimationExample
EXAMPLETITLE: Online Estimation of Frequency Responses of a Nonlinear Plant
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Use the Frequency Response Estimator block to perform online estimation of a nonlinear plant at different nominal operating points.


COMPONENT: slcontrol
EXAMPLENAME: SpecifyLinearizationForModelComponentsUsingSysIDExample
EXAMPLETITLE: Specify Linearization for Model Components Using System Identification
PRODUCT: MATLAB;Simulink Control Design;System Identification Toolbox;Simscape Electrical
DESCRIPTION:
You can use System Identification Toolbox software to identify a linear system for a model component that does not linearize well, and use the identified system to specify its linearization.


COMPONENT: slcontrol
EXAMPLENAME: VaryOperatingPointsandObtainMultipleTransferFunctionsUsiExample
EXAMPLETITLE: Vary Operating Points and Obtain Multiple Transfer Functions Using slLinearizer Interface
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Batch linearize your model at multiple operating points and obtain multiple open-loop and closed-loop transfer functions from the model.


COMPONENT: slcontrol
EXAMPLENAME: MeasureInputAdmittanceOutputImpedanceBoostConverterFREExample
EXAMPLETITLE: Frequency Response Estimation to Measure Input Admittance and Output Impedance of Boost Converter
PRODUCT: MATLAB;Simulink Control Design;Simscape Electrical;Simulink;Control System Toolbox
DESCRIPTION:
Identify frequency-domain models to measure the input admittance and output impedance of a boost converter model.


COMPONENT: slcontrol
EXAMPLENAME: TroubleshootLinearizationAtCommandLineExample
EXAMPLETITLE: Troubleshoot Linearization Results at Command Line
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
You can debug the linearization of a Simulink model at the command line using a LinearizationAdvisor object.


COMPONENT: slcontrol
EXAMPLENAME: CreateandConfigureslTunerInterfaceforControlSystemTuningExample
EXAMPLETITLE: Create and Configure slTuner Interface for Control System Tuning
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create and configure an slTuner interface for a Simulink® model that specifies which blocks to tune with systune or looptune .


COMPONENT: slcontrol
EXAMPLENAME: ObtainComplementarySensitivityFunctionatAnalysisPointExample
EXAMPLETITLE: Obtain Complementary Sensitivity Function at Analysis Point
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Obtain the complementary sensitivity function, calculated at the plant output, for the ex_scd_simple_fdbk model.


COMPONENT: slcontrol
EXAMPLENAME: TunePIDInRealTimeUsingOpenLoopPIDAutotunerBlockExample
EXAMPLETITLE: Tune PID Controller in Real Time Using Open-Loop PID Autotuner Block
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Tune a single-loop PID controller in real time by injecting sinusoidal perturbation signals at the plant input and measuring the plant output during an open-loop experiment.


COMPONENT: slcontrol
EXAMPLENAME: ChirpSignalBasedOnLinearizedDynamicsExample
EXAMPLETITLE: Chirp Signal Based on Linearized Dynamics
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create a chirp input signal based on the dynamics of a linear system. This approach is useful when you are using frequency response estimation to validate the linearization of your model.


COMPONENT: slcontrol
EXAMPLENAME: AdaptiveCruiseControlUsingExtremumSeekingControlExample
EXAMPLETITLE: Adaptive Cruise Control Using Extremum Seeking Control
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Design an extremum seeking controller to adjust controller gains for an adaptive cruise control system.


COMPONENT: slcontrol
EXAMPLENAME: DescribingFunctionAnalysisOfNonlinearSimulinkModelsExample
EXAMPLETITLE: Describing Function Analysis of Nonlinear Simulink Models
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
You can use frequency response estimation to perform a sinusoidal-input describing function analysis of your nonlinear model.


COMPONENT: slcontrol
EXAMPLENAME: AddAnalysisPointsUsingBlockPathAndPortNumberExample
EXAMPLETITLE: Add Analysis Points Using Block Path and Port Number
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Suppose you want to linearize the magball model and obtain a transfer function from the reference input to the plant output. Add the signals originating at the Desired Height and Magnetic Ball Plant blocks as analysis points to an slLinearizer interface.


COMPONENT: slcontrol
EXAMPLENAME: BatchLinearizeModelAtMultipleOPsDerivedFromParameterExample
EXAMPLETITLE: Batch Linearize Model at Multiple Operating Points Derived from Parameter Variations
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
If parameter variations affect the operating point of your system, trim the model for each parameter-value combination before linearization.


COMPONENT: slcontrol
EXAMPLENAME: PlotLinearSystemCharacteristicsOfAChemicalReactorExample
EXAMPLETITLE: Plot Linear System Characteristics of a Chemical Reactor
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Visualize linear system characteristics of nonlinear Simulink models at triggered simulation events.


COMPONENT: slcontrol
EXAMPLENAME: TunePIDControllerWithinModelReferenceExample
EXAMPLETITLE: Tune PID Controller Within Model Reference
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
When you open PID Tuner from a controller block in a model that is referenced in one or more open models, specify the top-level model for linearization and tuning.


COMPONENT: slcontrol
EXAMPLENAME: ImproveLinearAnalysisPerformanceExample
EXAMPLETITLE: Improve Linear Analysis Performance
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Use the fastRestartForLinearAnalysis command to speed up multiple calls to compiling functions in Simulink Control Design such as findop and linearize .


COMPONENT: slcontrol
EXAMPLENAME: DesignADRCForMultiInputMultiOutputPlantExample
EXAMPLETITLE: Design ADRC for Multi-Input Multi-Output Plant
PRODUCT: MATLAB;Simulink Control Design;Model Predictive Control Toolbox;Control System Toolbox;Simulink
DESCRIPTION:
Design ADRC for a pilot-scale distillation column MIMO model and compare performance against a model predictive controller.


COMPONENT: slcontrol
EXAMPLENAME: MultirateLinearizationAlgorithmExample
EXAMPLETITLE: Multirate Linearization Algorithm
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Demonstrates the algorithm that Simulink® Control Design™ software uses to linearize a multirate nonlinear Simulink model.


COMPONENT: slcontrol
EXAMPLENAME: SteadyStateSimulationWithProjectionBasedTrimOptimizerExample
EXAMPLETITLE: Steady-State Simulation with Projection-Based Trim Optimizer
PRODUCT: MATLAB;Simulink Control Design;Simscape Multibody;Optimization Toolbox
DESCRIPTION:
Trim a Simscape Multibody model using a projection-based optimizer that enforces the consistency of model initial conditions.


COMPONENT: slcontrol
EXAMPLENAME: ValidateLinearizationInFrequencyDomainAtCLExample
EXAMPLETITLE: Validate Linearization in Frequency Domain at Command Line
PRODUCT: MATLAB;Simulink Control Design;Aerospace Blockset
DESCRIPTION:
You can assess the accuracy of your linearization results at the command line by estimating the frequency response of the nonlinear model.


COMPONENT: slcontrol
EXAMPLENAME: TuneControlSystemtoSoftConstraintsExample
EXAMPLETITLE: Tune Control System to Soft Constraints
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Tune the control system in the rct_airframe2 model to soft goals for tracking, roll off, stability margin, and disturbance rejection.


COMPONENT: slcontrol
EXAMPLENAME: EnforceBarrierCertificateForCollisionFreeMultiRobotExample
EXAMPLETITLE: Enforce Barrier Certificate Constraints for Collision-Free Multi-Robot System
PRODUCT: MATLAB;Simulink Control Design;Optimization Toolbox;Simulink;Symbolic Math Toolbox
DESCRIPTION:
Enforce barrier certificate constraints for three robots to reach their target positions in collision-free manner.


COMPONENT: slcontrol
EXAMPLENAME: MarkAnalysisPointsForBatchLinearizationExample
EXAMPLETITLE: Mark Analysis Points Programmatically
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To mark analysis points programmatically, use the addPoint command. For example, consider the scdcascade model.


COMPONENT: slcontrol
EXAMPLENAME: VerifyModelUsingSCDAndSimulinkVerificationBlocksExample
EXAMPLETITLE: Verify Model Using Simulink Control Design and Simulink Verification Blocks
PRODUCT: MATLAB;Simulink Control Design;Simulink
DESCRIPTION:
Assert that linear system characteristics satisfy specified bounds using a combination of Simulink Control Design and Simulink verification blocks.


COMPONENT: slcontrol
EXAMPLENAME: EnforceBarrierCertificateConstraintsForPIDControllersExample
EXAMPLETITLE: Enforce Barrier Certificate Constraints for PID Controllers
PRODUCT: MATLAB;Simulink Control Design;Optimization Toolbox;Simulink
DESCRIPTION:
Apply barrier certificate constraints to a PID control application using the Barrier Certificate Enforcement block.


COMPONENT: slcontrol
EXAMPLENAME: ValidateOperatingPointAtTheCommandLineExample
EXAMPLETITLE: Validate Operating Point at the Command Line
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
When you compute an operating point at the command line, the findop function outputs an operating point report to the Command Window by default. You can also return the operating point report as an output argument. For more information, see docid:slcontrol_ug#bvfghpg. To validate your operating point against the specifications, you must check whether the operating point values satisfy the constraints.


COMPONENT: slcontrol
EXAMPLENAME: BoostConverterFREInModelLinearizerUsingPRBSExample
EXAMPLETITLE: Frequency Response Estimation in Model Linearizer Using Pseudorandom Binary Sequence
PRODUCT: MATLAB;Simulink Control Design;Simscape Electrical;Simulink
DESCRIPTION:
Identify a frequency-domain model for a high-frequency power electronics system using a PRBS input signal in Model Linearizer .


COMPONENT: slcontrol
EXAMPLENAME: InitializeOperatingPointSearchUsingMATLABCodeExample
EXAMPLETITLE: Initialize Operating Point Search at the Command Line
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
You can initialize operating point searches with a simulation snapshot when computing operating points using the findop function.


COMPONENT: slcontrol
EXAMPLENAME: ImplementGainScheduledPIDControllersExample
EXAMPLETITLE: Implement Gain-Scheduled PID Controllers
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To implement gain-scheduled control using a family of PID controllers, create a lookup table that associates each plant operating point with the corresponding PID gains.


COMPONENT: slcontrol
EXAMPLENAME: ChangePerturbationLevelOfBlocksExample
EXAMPLETITLE: Change Perturbation Level of Blocks Perturbed During Linearization
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Blocks that do not have preprogrammed analytic Jacobians linearize using numerical perturbation. You can change the perturbation level for your application, which changes the linearization results.


COMPONENT: slcontrol
EXAMPLENAME: LinearizeModelUsingMultipleStateInitialConditionsExample
EXAMPLETITLE: Linearize Model Using Multiple State Initial Conditions
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
When fast restart for linear analysis is on, calling compiling functions does not automatically apply changes to state initial conditions. Therefore, you must configure the initial state using an operating point object rather than using parameters or workspace variables.


COMPONENT: slcontrol
EXAMPLENAME: SimulatePIDAndIPDControllersInSimulinkExample
EXAMPLETITLE: Simulate PI-D and I-PD Controllers in Simulink
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To specify a PI-D or I-PD controller using the PID Controller (2DOF) or Discrete PID Controller (2DOF) blocks, open the block and set the Controller parameter to PID.


COMPONENT: slcontrol
EXAMPLENAME: ModelReferenceAdaptiveControlOfSatelliteSpinExample
EXAMPLETITLE: Model Reference Adaptive Control of Satellite Spin
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Design an MRAC controller that adapts plant uncertainty model parameters to achieve performance that matches an ideal reference model.


COMPONENT: slcontrol
EXAMPLENAME: LinearizationOfModelsWithModelReferencesExample
EXAMPLETITLE: Linearize Models with Model References
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To achieve an accurate block-by-block linearization of a model reference subsystem, first set it to run its simulation in normal mode.


COMPONENT: slcontrol
EXAMPLENAME: ValidateLinearizationUsingEstimatedFrequencyResponseExample
EXAMPLETITLE: Validate Exact Linearization Results Using Estimated Frequency Response
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Linearize a Simulink model and use frequency-response estimation to validate the exact linearization results.


COMPONENT: slcontrol
EXAMPLENAME: ObtainNegativeFeedbackTransferFunctionAtAnalysisPointExample
EXAMPLETITLE: Obtain Negative-Feedback Loop Transfer Function at Analysis Point
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Obtain the negative-feedback loop transfer function, calculated at e , for the ex_scd_simple_fdbk model.


COMPONENT: slcontrol
EXAMPLENAME: EnforceBarrierCertificateForAdaptiveCruiseControlExample
EXAMPLETITLE: Enforce Barrier Certificate Constraints for Adaptive Cruise Control
PRODUCT: MATLAB;Simulink Control Design;Optimization Toolbox;Simulink
DESCRIPTION:
Enforce barrier certificate constraints for adaptive cruise control to maintain velocity and following distance.


COMPONENT: slcontrol
EXAMPLENAME: ObtainSensitivityFunctionforSpecificParameterCombinationExample
EXAMPLETITLE: Obtain Sensitivity Function for Specific Parameter Combination
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Suppose you batch linearize the scdcascade model for multiple transfer functions. For most linearizations, you vary the proportional ( Kp2 ) and integral gain ( Ki2 ) of the C2 controller in the 10% range. For this example, obtain the sensitivity at the output of G2 , with the outer loop open, for the maximum values of Kp2 and Ki2 .


COMPONENT: slcontrol
EXAMPLENAME: SetRateConversionSettingsOfTunedPIDBlockExample
EXAMPLETITLE: Set Rate Conversion Settings of Tuned PID Block
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create an slTuner interface for the Simulink model scdcascade . Set the block rate conversion settings of one of the tuned blocks.


COMPONENT: slcontrol
EXAMPLENAME: LinearAnalysisInALoopWithFastRestartExample
EXAMPLETITLE: Linear Analysis in a Loop with Fast Restart
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Trim and linearize a closed-loop engine speed control model. Use fast restart for linear analysis to reduce the number of model compilations when looping over parameters.


COMPONENT: slcontrol
EXAMPLENAME: MultiloopControlDesignForBuckConverterExample
EXAMPLETITLE: Multiloop Control Design for Buck Converter
DESCRIPTION: Use systune to tune multiloop control structure for a buck converter model.
PRODUCT:
MATLAB;Simulink Control Design;System Identification Toolbox;Control System Toolbox;Simscape;Simscape Electrical;Simulink


COMPONENT: slcontrol
EXAMPLENAME: SpecifyModelPathDependenciesForParallelComputingExample
EXAMPLETITLE: Specify Model Path Dependencies for Parallel Computing
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To demonstrate a dependency on a file that is not in the current working folder, move the model files to a temporary folder and return the path to that folder. The pathdepSetup helper function also adds the temporary folder to the MATLAB® search path.


COMPONENT: slcontrol
EXAMPLENAME: ESCForReferenceModelTrackingOfUncertainDynamicalSystemsExample
EXAMPLETITLE: Extremum Seeking Control for Reference Model Tracking of Uncertain Systems
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Track a reference plant model by adapting feedforward and feedback gains for an uncertain dynamical system.


COMPONENT: slcontrol
EXAMPLENAME: DisableNoiseSourcesForFrequencyResponseEstimationExample
EXAMPLETITLE: Disable Noise Sources During Frequency Response Estimation
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Noise sources can interfere with the signals at the linearization output points and produce inaccurate estimation results.


COMPONENT: slcontrol
EXAMPLENAME: VaryParameterValuesandObtainMultipleTransferFunctionsUsiExample
EXAMPLETITLE: Vary Parameter Values and Obtain Multiple Transfer Functions
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Batch linearize your model for parameter variations, and obtain multiple open-loop and closed-loop transfer functions using an slLinearizer interface.


COMPONENT: slcontrol
EXAMPLENAME: SpecifyTemporaryLoopOpeningforSensitivityFunctionCalculaExample
EXAMPLETITLE: Specify Temporary Loop Opening for Sensitivity Function Calculation
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
For the scdcascade model, obtain the inner-loop sensitivity at the output of G2 , with the outer loop open.


COMPONENT: slcontrol
EXAMPLENAME: AddOpeningUsingBlockPathAndPortNumberExample
EXAMPLETITLE: Add Opening Using Block Path and Port Number
PRODUCT: Control System Toolbox;MATLAB;Simulink Control Design
DESCRIPTION:
Suppose you want to analyze only the inner-loop dynamics of the scdcascade model. Add the outer-loop feedback signal, y1m , as a permanent opening of an slLinearizer interface.


COMPONENT: slcontrol
EXAMPLENAME: GraphicallyAnalyzeResultsofControlSystemTuningExample
EXAMPLETITLE: Graphically Analyze Results of Control System Tuning
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Tune the Simulink® model, rct_engine_speed , to achieve a specified settling time. Use loopview to graphically analyze the tuning results.


COMPONENT: slcontrol
EXAMPLENAME: LinearizeModelsUsingDifferentRateConversionMethodsExample
EXAMPLETITLE: Linearize Models Using Different Rate Conversion Methods
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
When linearizing multirate Simulink models, your choice of rate conversion method can impact the resulting linear model.


COMPONENT: slcontrol
EXAMPLENAME: MRACOfAircraftUndergoingWingRockExample
EXAMPLETITLE: Model Reference Adaptive Control of Aircraft Undergoing Wing Rock
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Design an MRAC controller that adapts disturbance model parameters to achieve performance matching an ideal reference model.


COMPONENT: slcontrol
EXAMPLENAME: VerifyingFrequencyDomainCharacteristicsOfAnAircraftExample
EXAMPLETITLE: Verify Frequency-Domain Characteristics of an Aircraft
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Simulink Control Design software provides blocks that you can add to Simulink models to check that the linear response of the model satisfies frequency-domain characteristics during simulation.


COMPONENT: slcontrol
EXAMPLENAME: BoostConverterFRSPExample
EXAMPLETITLE: Design Controller for Boost Converter Model Using Frequency Response Data
PRODUCT: MATLAB;Simulink Control Design;Simscape Electrical
DESCRIPTION:
To design a controller for a Simscape Electrical model that cannot be linearized, you can estimate the frequency response of your plant and import this estimated data into PID Tuner.


COMPONENT: slcontrol
EXAMPLENAME: TrimAndLinearizeSimulinkModelsExample
EXAMPLETITLE: Trim and Linearize Simulink Models
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Programmatically linearize a watertank Simulink Model feedback control system. In the example, you obtain an open-loop linearized model of the water-tank system at an operating point where the tank level is at a steady state.


COMPONENT: slcontrol
EXAMPLENAME: SetValueOfTunedBlockParameterizationExample
EXAMPLETITLE: Set Value of Tuned Block Parameterization
PRODUCT: Control System Toolbox;MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Create an slTuner interface for the scdcascade model, and set the value of the parametrization of one of the tuned blocks.


COMPONENT: slcontrol
EXAMPLENAME: DesignADRCForBoostConverterExample
EXAMPLETITLE: Design Active Disturbance Rejection Control for Boost Converter
PRODUCT: MATLAB;Simulink Control Design;Control System Toolbox;Simscape Electrical;Simulink
DESCRIPTION:
Design ADRC for a boost converter model and compare performance against a PID controller tuned on a linearized model.


COMPONENT: slcontrol
EXAMPLENAME: ValidateLinearizationResultInTimeDomainExample
EXAMPLETITLE: Validate Linearization in Time Domain
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
You can assess the accuracy of your linearization results by comparing the simulated output of the nonlinear model and the linearized model.


COMPONENT: slcontrol
EXAMPLENAME: TuneGainScheduledControllerForPMSMUsingPIDAutotunerExample
EXAMPLETITLE: Tune Gain-Scheduled Controller for PMSM Model Using Closed-Loop PID Autotuner Block
PRODUCT: MATLAB;Simulink Control Design;Motor Control Blockset;Simulink
DESCRIPTION:
Use Closed-Loop PID Autotuner block to tune gain-scheduled PI controller for a PMSM model in one simulation.


COMPONENT: slcontrol
EXAMPLENAME: CreateandConfigureslLinearizerInterfaceforBatchLinearAnaExample
EXAMPLETITLE: Create and Configure slLinearizer Interface for Batch Linear Analysis
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create an slLinearizer interface for the scdcascade model. Add analysis points to the interface to extract open-loop or closed-loop transfer functions from the model. Configure the interface to vary parameters and operating points.


COMPONENT: slcontrol
EXAMPLENAME: ModelComputationalDelayAndSamplingEffectsExample
EXAMPLETITLE: Model Computational Delay and Sampling Effects
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Closed-loop responses can become oscillatory and unstable if you do not account for model delays and sampling effects in your controller design.


COMPONENT: slcontrol
EXAMPLENAME: BoostConverterPIDTuningExample
EXAMPLETITLE: Tune PID Controller in Real Time Using Closed-Loop PID Autotuner Block
PRODUCT: MATLAB;Simulink Control Design;Simscape Electrical
DESCRIPTION:
Tune a single-loop PID controller in real time by injecting sinusoidal perturbation signals at the plant input and measuring the plant output during a closed-loop experiment.


COMPONENT: slcontrol
EXAMPLENAME: OnlineFrequencyResponseEstimationUsingPRBSInputSignalsExample
EXAMPLETITLE: Online Frequency Response Estimation Using PRBS Input Signals
PRODUCT: MATLAB;Simulink Control Design;Simulink
DESCRIPTION:
Use the Frequency Response Estimator block to perform online and offline estimation using PRBS input signals.


COMPONENT: slcontrol
EXAMPLENAME: ObtainComplementarySensitivityFunctionforSpecificParametExample
EXAMPLETITLE: Obtain Complementary Sensitivity Function for Specific Parameter Combination
PRODUCT: MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Suppose you batch linearize the scdcascade model for multiple transfer functions. For most linearizations, you vary the proportional ( Kp2 ) and integral gain ( Ki2 ) of the C2 controller in the 10% range. For this example, calculate the complementary sensitivity function for the inner loop for the maximum value of Kp2 and Ki2 .


COMPONENT: slcontrol
EXAMPLENAME: SetValueOfTunedBlockParamUsingGenStateSpaceModelExample
EXAMPLETITLE: Set Value of Tuned Block Parameterization Using Generalized State-Space Model
PRODUCT: MATLAB;Robust Control Toolbox;Simulink Control Design
DESCRIPTION:
Convert an slTuner interface for the Simulink® model rct_diskdrive to a genss model to tune the model blocks using hinfstruct . After tuning, update the slTuner interface with the tuned parameters and write the parameter values to the Simulink model for validation.


COMPONENT: slcontrol
EXAMPLENAME: InitializeModelWithOperatingPointValuesExample
EXAMPLETITLE: Initialize Model with Operating Point Values
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Open the scdplane model and create an operating point. You can also compute a trimmed operating point or obtain an operating point snapshot.


COMPONENT: slcontrol
EXAMPLENAME: AugmentBlockLinearizationExample
EXAMPLETITLE: Augment Block Linearization
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Augment the linearization of a block with additional time delay dynamics using a block linearization specification function.


COMPONENT: slcontrol
EXAMPLENAME: DesignPIDUsingPlantFrequencyResponseNearBandwidthExample
EXAMPLETITLE: Design PID Controller Using Plant Frequency Response Near Bandwidth
PRODUCT: MATLAB;Simulink Control Design;Simscape Electrical
DESCRIPTION:
Tune a PID Controller for a plant that does not linearize using the Frequency Response Based PID Tuner .


COMPONENT: slcontrol
EXAMPLENAME: CreatePRBSSignalBasedOnLinearizedDynamicsExample
EXAMPLETITLE: Create PRBS Signal Based on Linearized Dynamics
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create a PRBS input signal based on the dynamics of a linear system. This approach is useful when you are using frequency response estimation to validate the linearization of your model.


COMPONENT: slcontrol
EXAMPLENAME: CollectFrequencyResponseDataForOfflineEstimationExample
EXAMPLETITLE: Collect Frequency Response Experiment Data for Offline Estimation
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Use the Frequency Response Estimator block to perform a frequency response estimation experiment and store the data for later estimation offline.


COMPONENT: slcontrol
EXAMPLENAME: TuneCustomMaskedSubsystemsExample
EXAMPLETITLE: Tune Custom Masked Subsystems
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
To tune a controller within a custom masked subsystem, you can configure the subsystem as a tunable block.


COMPONENT: slcontrol
EXAMPLENAME: ObtainOpenLoopResponseTransferFunctionforSpecificParametExample
EXAMPLETITLE: Obtain Open-Loop Response Transfer Function for Specific Parameter Combination
PRODUCT: MATLAB;Simulink;Simulink Control Design
DESCRIPTION:
Suppose you batch linearize the scdcascade model for multiple transfer functions. For most linearizations, you vary the proportional ( Kp2 ) and integral gain ( Ki2 ) of the C2 controller in the 10% range. For this example, calculate the open-loop response transfer function for the inner loop, from e2 to y2 , for the maximum value of Kp2 and Ki2 .


COMPONENT: slcontrol
EXAMPLENAME: SpeedUpFREUsingParallelComputingExample
EXAMPLETITLE: Speed Up Frequency Response Estimation Using Parallel Computing
PRODUCT: MATLAB;Simulink Control Design;Parallel Computing Toolbox
DESCRIPTION:
You can reduce the total simulation time required for estimating frequency responses by distributing simulations across multiple workers.


COMPONENT: slcontrol
EXAMPLENAME: EnforceConstraintsForPIDControllerExample
EXAMPLETITLE: Enforce Constraints for PID Controllers
PRODUCT: MATLAB;Simulink Control Design;Optimization Toolbox
DESCRIPTION:
Apply a known constraint function to a PID control application using the Constraint Enforcement block.


COMPONENT: slcontrol
EXAMPLENAME: ComputeOperatingPointSnapshotsAtTriggeredEventsExample
EXAMPLETITLE: Compute Operating Point Snapshots at Triggered Events
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
You can find an operating point by simulating the model until it is at steady state and taking a simulation snapshot.


COMPONENT: slcontrol
EXAMPLENAME: SinestreamSignalBasedOnLinearizedDynamicsExample
EXAMPLETITLE: Sinestream Signal Based on Linearized Dynamics
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create a sinestream input signal based on the dynamics of a linear system. This approach is useful when you are using frequency response estimation to validate the linearization of your model.


COMPONENT: slcontrol
EXAMPLENAME: RemoveBlockFromListofTunedBlocksofslTunerInterfaceExample
EXAMPLETITLE: Remove Block From List of Tuned Blocks of slTuner Interface
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Create an slTuner interface for the scdcascade model. Add C1 and C2 as tuned blocks to the interface.


COMPONENT: slcontrol
EXAMPLENAME: DesignPIDForThreePhaseRectifierUsingClosedLoopPIDAutoExample
EXAMPLETITLE: Design PID Controllers for Three-Phase Rectifier Using Closed-Loop PID Autotuner Block
PRODUCT: MATLAB;Simulink Control Design;Simulink;Simscape Electrical
DESCRIPTION:
Tune controllers for a Vienna-rectifier-based power factor corrector using the Closed-Loop PID Autotuner block.


COMPONENT: slcontrol
EXAMPLENAME: TrimAndLinearizeAnAirframeExample
EXAMPLETITLE: Trim and Linearize an Airframe
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Find a steady-state operating point for an aircraft traveling at a set speed and linearize the model at that operating point.


COMPONENT: slcontrol
EXAMPLENAME: ConvertDistillationColumnProblemForTuningWithSystuneExample
EXAMPLETITLE: Convert Distillation Column Problem for Tuning with systune
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Set up the control system of the Simulink® model rct_distillation for tuning with looptune . Then, convert the setup to a systune problem, and examine the resulting arguments. The results reflect the tuning requirements implicitly enforced when tuning with looptune .


COMPONENT: slcontrol
EXAMPLENAME: LinearizationOfModelsWithDelaysExample
EXAMPLETITLE: Linearize Models with Delays
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
When linearizing a Simulink model with continuous-time delay blocks, you can either approximate the delays or represent the delays exactly.


COMPONENT: slcontrol
EXAMPLENAME: LearnAndApplyConstraintsForPIDControllerExample
EXAMPLETITLE: Learn and Apply Constraints for PID Controllers
PRODUCT: MATLAB;Simulink Control Design;Optimization Toolbox;Deep Learning Toolbox
DESCRIPTION:
Learn and apply an unknown constraint function for a PID control application using the Constraint Enforcement block.


COMPONENT: slcontrol
EXAMPLENAME: BatchTrimModelForParameterVariationsExample
EXAMPLETITLE: Batch Trim Model for Parameter Variations
PRODUCT: MATLAB;Simulink Control Design
DESCRIPTION:
Obtain multiple operating points for a model by varying parameter values. You can study the controller robustness to plant variations by batch linearizing the model using the trimmed operating points.


COMPONENT: slcontrol
EXAMPLENAME: TrainRLAgentForACCWithConstraintEnforcementExample
EXAMPLETITLE: Train RL Agent for Adaptive Cruise Control with Constraint Enforcement
PRODUCT: MATLAB;Simulink Control Design;Reinforcement Learning Toolbox;Optimization Toolbox
DESCRIPTION:
Train a reinforcement learning agent for adaptive cruise control with enforced constraints on velocity and following distance.


COMPONENT: slcontrol
EXAMPLENAME: EnforceBarrierCertificateForCollisionFreeRobotsExample
EXAMPLETITLE: Enforce Barrier Certificate Constraints for Collision-Free Robots
PRODUCT: MATLAB;Simulink Control Design;Simulink;Optimization Toolbox
DESCRIPTION:
Enforce barrier certificate constraints for two robots to reach their target positions in collision-free manner.


COMPONENT: slcoverage
EXAMPLENAME: BasicOperationOfTheModelCoverageToolExample
EXAMPLETITLE: Basic Operation of the Model Coverage Tool
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Use the Configuration Parameters dialog to enable coverage for a Simulink® model and adjust the type of information that is reported.


COMPONENT: slcoverage
EXAMPLENAME: GetSelectorByTypeAndDescriptionExample
EXAMPLETITLE: Get Selector by Type and Description
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Get a selector by type and description. In this example, you get all selectors for the False outcomes of the And block whose type is ConditionOutcome .


COMPONENT: slcoverage
EXAMPLENAME: RecordCoverageInParallelSimulationsExample
EXAMPLETITLE: Record Coverage in Parallel Simulations by Using Parsim
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Record coverage in multiple parallel Simulink® simulations corresponding to different test cases by using SimulationInput objects and the parsim command. If Parallel Computing Toolbox is installed on your system, the parsim command runs simulations in parallel. Otherwise, the simulations are run in serial.


COMPONENT: slcoverage
EXAMPLENAME: CumulativeCoverageAnalysisExample
EXAMPLETITLE: Cumulative Coverage Analysis
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Illustrates the use of the Coverage Results Explorer to simplify the generation of cumulative coverage data and reports spanning a set of multiple coverage runs.


COMPONENT: slcoverage
EXAMPLENAME: LogicalOperatorCascadePatternsExample
EXAMPLETITLE: Logical Operator Cascade Patterns
PRODUCT: MATLAB;Simulink Coverage;Simulink
DESCRIPTION:
How Simulink® Coverage™ analyzes logical operator blocks when they are downstream of other logical operator blocks.


COMPONENT: slcoverage
EXAMPLENAME: ExtractSaturationOnIntegerOverflowDataExample
EXAMPLETITLE: Extract Saturation on Integer Overflow Data
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Use overflowsaturationinfo to extract saturation on integer overflow data for a MinMax block from a cvdata object.


COMPONENT: slcoverage
EXAMPLENAME: MinMaxRelBoundCoverageExample
EXAMPLETITLE: Collect Relational Boundary Coverage for MinMax Block
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
View and interpret relational boundary coverage results for a MinMax block in three signal size configurations. For more information about relational boundary coverage, see Types of Model Coverage. For more information about relational boundary coverage in the coverage report, see Relational Boundary.


COMPONENT: slcoverage
EXAMPLENAME: CreatingAndUsingCoverageFiltersExample
EXAMPLETITLE: Creating and Using Coverage Filters
PRODUCT: MATLAB;Simulink Coverage;Simulink;Stateflow
DESCRIPTION:
Use Simulink® Coverage™ model coverage filters to exclude model elements from coverage analysis and justify missing coverage in reports.


COMPONENT: slcoverage
EXAMPLENAME: ApplyMultipleCoverageFiltersExample
EXAMPLETITLE: Use Multiple Coverage Filter Files for a Simulation
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
If you have multiple filter files that each contain their own set of rules, you can apply them to a coverage result set by creating a cell array of the filter file names or path names. In this example, you apply two filter files to a single cvdata object and then view the report to see that the filters are applied.


COMPONENT: slcoverage
EXAMPLENAME: GetStartedWithSimulinkCoverageExample
EXAMPLETITLE: Open the Model
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Open the slvnvdemo_powerwindow model. The slvnvdemo_powerwindow model contains a power window controller and a low-order plant model. The controller is implemented with a Stateflow® chart.


COMPONENT: slcoverage
EXAMPLENAME: GetSpecificCoverageDataFromCvdatagroupExample
EXAMPLETITLE: Get Coverage Data from cvdatagroup Objects
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Retrieve a specified coverage data object, all coverage data objects, or all coverage data object names from a cv.cvdatagroup object.


COMPONENT: slcoverage
EXAMPLENAME: FilterCodeCoverageOutcomesUsingTheCodePaneExample
EXAMPLETITLE: View and Filter Code Coverage Results Using the Code Pane
PRODUCT: MATLAB;Simulink Coverage;Embedded Coder
DESCRIPTION:
View code coverage results and justify code coverage outcomes directly from the Code pane in Simulink®.


COMPONENT: slcoverage
EXAMPLENAME: CoverageForSFunctionsExample
EXAMPLETITLE: Coverage for S-Functions
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Configure an S-Function generated with the Legacy Code Tool to be compatible with coverage. The model coverage tool supports S-Functions that are:


COMPONENT: slcoverage
EXAMPLENAME: CoverageForMinMaxCollapseModeExample
EXAMPLETITLE: Collect Coverage for a MinMax Block that Uses Collapse Mode
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Analyze and interpret coverage results for a MinMax block that applies the selected function over a dimension.


COMPONENT: slcoverage
EXAMPLENAME: AnalyzingMCDCForCascadedLogicBlocksExample
EXAMPLETITLE: Analyzing MCDC for Cascaded Logic Blocks
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Illustrates how Simulink® Coverage™ records the MCDC metric for a cascade of Logical Operator blocks.


COMPONENT: slcoverage
EXAMPLENAME: RetrieveCyclomaticComplexityExample
EXAMPLETITLE: Retrieve Cyclomatic Complexity Data from Coverage Object
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Retrieve cyclomatic complexity information for the Gain subsystem of the slvnvdemo_cv_small_controller model.


COMPONENT: slcoverage
EXAMPLENAME: FilterCoverageOutcomesInGeneratedCodeExample
EXAMPLETITLE: Use Justification Rules to Filter Code Coverage Outcomes
PRODUCT: MATLAB;Simulink Coverage;Embedded Coder
DESCRIPTION:
Filter code coverage outcomes in the coverage report after collecting coverage for a model in software-in-the-loop (SIL) or processor-in-the-loop (PIL) mode.


COMPONENT: slcoverage
EXAMPLENAME: AddMetricSelectorRuleToAFilterExample
EXAMPLETITLE: Add Metric Selector Rule to a Filter
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Select a metric and add a rule that uses that metric. In this example, you create a rule to justify an unsatisfied decision for a Saturation block.


COMPONENT: slcoverage
EXAMPLENAME: RetrieveStatementAndFunctionCoverageExample
EXAMPLETITLE: Retrieve Statement and Function Coverage
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Extract statement, function, and function call coverage for a model simulated in software-in-the-loop (SIL) mode.


COMPONENT: slcoverage
EXAMPLENAME: CollectCoverageForMultipleSimulationsExample
EXAMPLETITLE: Collect Coverage for Multiple Simulations by Using Design Studies
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Collect coverage when running multiple simulations. To learn more about running multiple simulations, see Run Multiple Simulations.


COMPONENT: slcoverage
EXAMPLENAME: CommandLineVerificationExample
EXAMPLETITLE: Command Line Verification Tutorial
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Creates three test cases for an adjustable rate limiter and analyzes the resulting model coverage using the command-line API of the Model Coverage tool.


COMPONENT: slcoverage
EXAMPLENAME: ExtractingDetailedCoverageDataExample
EXAMPLETITLE: Extracting Detailed Information from Coverage Data
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
How coverage utility commands can be used to extract information for an individual subsystem, block, or Stateflow® object from cvdata objects.


COMPONENT: slcoverage
EXAMPLENAME: GetAllSelectorsExample
EXAMPLETITLE: Get All Selectors
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Get all the selectors for an And block and then add a rule to justify or exclude a selector. Metric selectors can only be justified.


COMPONENT: slcoverage
EXAMPLENAME: OperationsOnCoverageDataExample
EXAMPLETITLE: Perform Operations on Coverage Data
PRODUCT: MATLAB;Simulink;Simulink Coverage
DESCRIPTION:
Use the overloaded operators + , * , and - to combine coverage results into a union, intersection, or set difference of results.


COMPONENT: slcoverage
EXAMPLENAME: CreateACodeOutcomeSelectorExample
EXAMPLETITLE: Create a C Code Outcome Selector
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Use an slcoverage.CodeSelector object to filter a code outcome in a custom C or C++ program called by a C Caller block.


COMPONENT: slcoverage
EXAMPLENAME: DetermineIndividualIntegerOverflowOutcomesExample
EXAMPLETITLE: Determine Individual Integer Overflow Outcomes
PRODUCT: MATLAB;Simulink Coverage
DESCRIPTION:
Use overflowsaturationinfo to determine whether or not integer overflow occurs for a block in a model.


COMPONENT: sldo
EXAMPLENAME: CreateAnOperatingPointObjectExample
EXAMPLETITLE: Create a Steady-State Operating Point Object
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
For this example, consider a Simulink model 'PopulationModel' which models a simple ecology where an organism population growth is limited by the carrying capacity of the environment.


COMPONENT: sldo
EXAMPLENAME: ScatterPlotofParameterSamplesandCostFunctionEvaluationsExample
EXAMPLETITLE: Scatter Plot of Parameter Samples and Cost Function Evaluations
PRODUCT: MATLAB;Simulink Design Optimization;Simulink
DESCRIPTION:
Generally, you use the sdo.scatterPlot(X,Y) syntax with X specifying the samples and Y specifying the cost function value for each sample. Use the sdo.evaluate command to perform the cost function evaluation to generate Y. For this example, obtain 100 samples of the Ac and K parameters of the sdoHydraulicCyclinder model. Calculate the cost function as a function of Ac and K. Create a scatter plot to see the sample and cost function values.


COMPONENT: sldo
EXAMPLENAME: GenerateMATLABCodeForParameterEstimationProblemsGUIExample
EXAMPLETITLE: Generate MATLAB Code for Parameter Estimation Problems (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use the Parameter Estimator to define an estimation problem, and then generate a MATLAB function for parameter estimation at the command line.


COMPONENT: sldo
EXAMPLENAME: DesignOptimizationToMeetTimeAndFrequencyRequirementsGUIExample
EXAMPLETITLE: Design Optimization to Meet Time-Domain and Frequency-Domain Requirements (GUI)
PRODUCT: MATLAB;Simulink Control Design;Simulink Design Optimization
DESCRIPTION:
Interactively tune a controller to satisfy time-domain and frequency-domain design requirements using the Response Optimizer app.


COMPONENT: sldo
EXAMPLENAME: GetModelStatesExample
EXAMPLETITLE: Get Model States
PRODUCT: MATLAB;Optimization Toolbox;Simulink;Simulink Design Optimization
DESCRIPTION:
S is a vector containing nine param.State objects, which represent all the states of the sdoAircraft model.


COMPONENT: sldo
EXAMPLENAME: GriddedSamplingOfDiscreteParametersExample
EXAMPLETITLE: Gridded Sampling of Discrete Parameters
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
You can sample discrete parameters across their full gird of allowed values or across a subset of those values. As with continuous parameters, sampling can be exhaustive or sequential.


COMPONENT: sldo
EXAMPLENAME: InvertedPendulumControllerTuningExample
EXAMPLETITLE: Inverted Pendulum Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the controller of an inverted pendulum. The inverted pendulum is on a cart and the motion of the cart is controlled. The controller's Proportional, Integral and Feed-forward gains are tuned to limit pendulum angle variations and respond to step changes in cart position optimally.


COMPONENT: sldo
EXAMPLENAME: SetModelToSteadyStateWhenEstimatingParametersCodeExample
EXAMPLETITLE: Set Model to Steady-State When Estimating Parameters (Code)
PRODUCT: MATLAB;Simulink Design Optimization;Simulink Control Design
DESCRIPTION:
Set a model to steady-state in the process of parameter estimation. Setting a model to steady-state is important in many applications such as power systems and aircraft dynamics. This example uses a population dynamics model.


COMPONENT: sldo
EXAMPLENAME: TuningOfAirframeAutopilotGainsExample
EXAMPLETITLE: Tuning of Airframe Autopilot Gains
PRODUCT: MATLAB;Aerospace Blockset;Simulink Design Optimization
DESCRIPTION:
Apply Simulink® Design Optimization™ to optimize the autopilot gains of an airframe to control its fin deflection. The model uses blocks from Aerospace Blockset™.


COMPONENT: sldo
EXAMPLENAME: EngineDesignAndCostTradeoffsExample
EXAMPLETITLE: Engine Design and Cost Tradeoffs
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize a design for performance and cost. In this example, you tune an automotive engine speed controller while reducing controller costs by tuning sensor accuracy and actuator response time.


COMPONENT: sldo
EXAMPLENAME: DistillationControllerTuningExample
EXAMPLETITLE: Distillation Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the multi-loop controller parameters of a distillation column. The Distillation column produces methanol and is represented as a linear model with delays. The digital multi-loop controller consists of a decoupling matrix and two single-loop PI controllers. The parameters of both the single-loop controllers are tuned simultaneously to satisfy a 14 percent overshoot and 13 minute rise-time step response characteristics.


COMPONENT: sldo
EXAMPLENAME: IdentifyKeyParametersForEstimationCodeExample
EXAMPLETITLE: Identify Key Parameters for Estimation (Code)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use sensitivity analysis to narrow down the number of parameters that you need to estimate to fit a model. This example uses a model of the vestibulo-ocular reflex, which generates compensatory eye movements.


COMPONENT: sldo
EXAMPLENAME: OptimizeParametersForRobustnessGUIExample
EXAMPLETITLE: Optimize Parameters for Robustness (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Optimize a design to meet a custom signal requirement. You optimize the controller parameters to minimize the plant actuation signal energy while satisfying step response requirements.


COMPONENT: sldo
EXAMPLENAME: DesignOptimizationWithUncertainVariablesCodeExample
EXAMPLETITLE: Design Optimization with Uncertain Variables (Code)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Optimize a design when there are uncertain variables. You optimize the dimensions of a Continuously Stirred Tank Reactor (CSTR) to minimize product concentration variation and production cost in case of varying, or uncertain, feed stock.


COMPONENT: sldo
EXAMPLENAME: AddParametersToGriddedParameterSpaceExample
EXAMPLETITLE: Add Parameters to Gridded Parameter Space
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Open the sdoCSTR model and extract continuous parameters A and h. Assign values to these parameters for gridded sampling and define the parameter space.


COMPONENT: sldo
EXAMPLENAME: SurrogateOptimizationInSimulinkDesignOptimizationExample
EXAMPLETITLE: Surrogate Optimization in Simulink Design Optimization
PRODUCT: MATLAB;Simulink Design Optimization;Parallel Computing Toolbox;Global Optimization Toolbox
DESCRIPTION:
Use surrogate optimization in Simulink® Design Optimization™ to optimize the design of a hydraulic cylinder.


COMPONENT: sldo
EXAMPLENAME: ConfigureDiscreteValuedParametersForOptimizationExample
EXAMPLETITLE: Configure Discrete-Valued Parameters for Optimization or Estimation
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Configure variable parameters in a Simulink® model for response optimization or parameter estimation, where the parameter values are restricted to a specified discrete set of values.


COMPONENT: sldo
EXAMPLENAME: DesignOptimizationToMeetACustomObjectiveGUIExample
EXAMPLETITLE: Design Optimization to Meet a Custom Objective (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Optimize a design to meet a custom objective using the Response Optimizer app. You optimize the cylinder parameters to minimize the cylinder geometry and satisfy design requirements.


COMPONENT: sldo
EXAMPLENAME: EnforcingTimeAndFreqRequirementsOnASingleLoopControllerExample
EXAMPLETITLE: Enforcing Time and Frequency Requirements on a Single-Loop Controller Design
PRODUCT: MATLAB;Simulink Control Design;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to tune a compensator in a Simulink model. You will add performance requirements to further refine and optimize an initial compensator design performed with Simulink Control Design™ (see Single Loop Feedback/Prefilter Compensator Design (Simulink Control Design)).


COMPONENT: sldo
EXAMPLENAME: DiscreteValuedVariablesInResponseOptimizationAppExample
EXAMPLETITLE: Discrete-Valued Variables in Response Optimization (GUI)
PRODUCT: MATLAB;Simulink Design Optimization;Simulink
DESCRIPTION:
Use the Response Optimizer app to interactively tune model parameters that are restricted to a discrete, finite set of values.


COMPONENT: sldo
EXAMPLENAME: EngineSpeedModelParameterEstimationExample
EXAMPLETITLE: Engine Speed Model Parameter Estimation
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Estimate the coefficients of a nonlinear (quadratic) function to approximate the dynamic behavior of a system component.


COMPONENT: sldo
EXAMPLENAME: ClutchFrictionCoefficientEstimationExample
EXAMPLETITLE: Clutch Friction Coefficient Estimation
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to estimate parameters of a clutch model created using Simscape™ Driveline™ library blocks.


COMPONENT: sldo
EXAMPLENAME: DesignForRobustnessToModelComponentTolerancesExample
EXAMPLETITLE: Design Optimization for Robustness to Model Component Tolerances
PRODUCT:
MATLAB;Simulink Design Optimization;Simscape Electrical;Statistics and Machine Learning Toolbox;Stateflow

DESCRIPTION:
Use sensitivity analysis and response optimization and to evaluate how well a model satisfies design requirements and optimize design variables in the presence of uncertainties in model parameters.


COMPONENT: sldo
EXAMPLENAME: SampleGriddedParameterSpaceExample
EXAMPLETITLE: Sample Gridded Parameter Space
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Open a model and get two parameters from the model. Create a gridded parameter space with equal numbers of allowed values for two parameters.


COMPONENT: sldo
EXAMPLENAME: BatteryDegradationParameterEstimationDeploymentExample
EXAMPLETITLE: Parameter Tuning for Digital Twins
PRODUCT: MATLAB;Simulink Design Optimization;Simulink Compiler
DESCRIPTION:
Monitor the condition of an electric vehicle battery in the field with a deployed version of parameter estimation using Simulink Compiler .


COMPONENT: sldo
EXAMPLENAME: DesignOptimizationToMeetACustomObjectiveCodeExample
EXAMPLETITLE: Design Optimization to Meet a Custom Objective (Code)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Optimize a design to meet a custom objective using sdo.optimize . You optimize the cylinder parameters to minimize the cylinder geometry and satisfy design requirements.


COMPONENT: sldo
EXAMPLENAME: PhaseLockLoopTuningExample
EXAMPLETITLE: Phase Lock Loop Tuning
PRODUCT: MATLAB;Simulink Design Optimization;Mixed-Signal Blockset
DESCRIPTION:
Use Simulink® Design Optimization™ to tune an all-pass filter of a Phase Lock Loop. The filter includes a second-order low pass filter and a feedthrough gain. The feedthrough gain and the second order filter coefficients are tuned to apply a steady-state input to the Voltage Controlled Oscillator (VCO).


COMPONENT: sldo
EXAMPLENAME: ImprovingOptimizationPerformanceUsingParallelComputingExample
EXAMPLETITLE: Improving Optimization Performance Using Parallel Computing
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink Design Optimization
DESCRIPTION:
Improve optimization performance using the Parallel Computing Toolbox™. The example discusses the speedup seen when using parallel computing to optimize a complex Simulink® model. The example also shows the effect of the number of parameters and the model simulation time when using parallel computing.


COMPONENT: sldo
EXAMPLENAME: DCServoMotorParameterEstimationExample
EXAMPLETITLE: DC Servo Motor Parameter Estimation
PRODUCT: MATLAB;Simscape Electrical;Simulink Design Optimization
DESCRIPTION:
Estimate the parameters of a multi-domain DC servo motor model constructed using various physical modeling products.


COMPONENT: sldo
EXAMPLENAME: MagneticLevitationControllerTuningExample
EXAMPLETITLE: Magnetic Levitation Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use numerical optimization to tune the controller parameters of a nonlinear system. In this example, we model a CE 152 Magnetic Levitation system where the controller is used to position a freely levitating ball in a magnetic field. The control structure for this model is fixed and the required controller performance can be specified in terms of an idealized time response.


COMPONENT: sldo
EXAMPLENAME: SpecifyAllParametersAsDiscreteValuedExample
EXAMPLETITLE: Specify All Parameters as Discrete-Valued
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
If you want to designate all model parameters as discrete-valued, you can use the placeholder "*" as an input to sdo.getParameterFromModel to avoid explicitly listing every model parameter in the discreteParams argument. Similarly, if you specify a subset of model parameters in continParams, you can use "*" to specify the remaining parameters as discrete-valued.


COMPONENT: sldo
EXAMPLENAME: PowerConverterTuningExample
EXAMPLETITLE: Power Converter Tuning
PRODUCT: MATLAB;Simscape Electrical;Simulink Design Optimization;Simscape
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the current controller parameters of a 3-phase thyristor converter. The model uses blocks from Simscape™ and Simscape Electrical™.


COMPONENT: sldo
EXAMPLENAME: SimplifiedAlternatorParameterEstimationExample
EXAMPLETITLE: Simplified Alternator Parameter Estimation
PRODUCT: MATLAB;Simscape Electrical;Simulink Design Optimization
DESCRIPTION:
Use parameter bounds to improve estimation performance. This is illustrated by estimating the power rating, P, of a synchronous machine.


COMPONENT: sldo
EXAMPLENAME: GenerateSamplesWithGriddedAndRandomParametersExample
EXAMPLETITLE: Generate Samples with Both Gridded and Random Parameters
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
If your model contains some parameters you want to sample across a grid and others from which you want to draw random samples, you can combine gridded and random parameter spaces.


COMPONENT: sldo
EXAMPLENAME: ImportingAndPreprocessingExperimentDataGUIExample
EXAMPLETITLE: Importing and Preprocessing Experiment Data (GUI)
PRODUCT: MATLAB;Simulink Design Optimization;Simscape
DESCRIPTION:
Create an estimation experiment from measured data stored in a file and how to preprocess the measured data. You use the imported data to estimate the parameters of a simple RC circuit.


COMPONENT: sldo
EXAMPLENAME: GetMultipleModelParametersAsOptimizationDesignVariablesExample
EXAMPLETITLE: Get Specified Model Parameters as Continuous or Discrete Design Variables
PRODUCT: MATLAB;Simulink;Optimization Toolbox;Simulink Design Optimization
DESCRIPTION:
Instead of designating all tunable model parameters as design variables for optimization, you can specify a subset of variables. Load a Simulink model that has five tunable parameters: Kp, Ki, Kd, w0, and zeta. Configure Kp, Ki, and Kd as continuous design variables.


COMPONENT: sldo
EXAMPLENAME: HeatExchangerControllerTuningExample
EXAMPLETITLE: Heat Exchanger Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the temperature control of a heat exchanger around a temperature set-point.


COMPONENT: sldo
EXAMPLENAME: LQGControllerTuningExample
EXAMPLETITLE: LQG Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the output response of a plant by tuning the LQR gain matrix and feed-forward gain. This model includes uncertainty in the plant model and accounts for this uncertainty in the optimization process.


COMPONENT: sldo
EXAMPLENAME: GenerateMATLABCodeForDeployedEstimationProblemsGUIExample
EXAMPLETITLE: Generate MATLAB Code for Deployed Parameter Estimation Problems (GUI)
PRODUCT: MATLAB;Simulink Design Optimization;Simulink Compiler;Optimization Toolbox
DESCRIPTION:
Automatically generate MATLAB to solve a parameter estimation problem deployed using Simulink Compiler .


COMPONENT: sldo
EXAMPLENAME: TuneDiscreteValuedVariablesCodeExample
EXAMPLETITLE: Discrete-Valued Variables in Response Optimization (Code)
PRODUCT: MATLAB;Simulink Design Optimization;Optimization Toolbox;Global Optimization Toolbox
DESCRIPTION:
Use response optimization to tune model parameters that are restricted to a discrete, finite set of values.


COMPONENT: sldo
EXAMPLENAME: IdentifyKeyParametersForEstimationGUIExample
EXAMPLETITLE: Identify Key Parameters for Estimation (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use sensitivity analysis to narrow down the number of parameters that you need to estimate when fitting a model. This example uses a model of the vestibulo-ocular reflex, which generates compensatory eye movements.


COMPONENT: sldo
EXAMPLENAME: PIDTuningWithReferenceTrackingAndPlantUncertaintyExample
EXAMPLETITLE: PID Tuning with Reference Tracking and Plant Uncertainty
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to track a reference signal and optimize the response with uncertainties in the plant model. The plant model consists of the plant transfer function and includes a Saturation block and a Rate Limits block. To view the results, use the following steps.


COMPONENT: sldo
EXAMPLENAME: SpecifyCustomSignalObjectiveWithUncertainVariableGUIExample
EXAMPLETITLE: Specify Custom Signal Objective with Uncertain Variable (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Specify a custom objective function for a model signal. You calculate the objective function value using a variable that models parameter uncertainty.


COMPONENT: sldo
EXAMPLENAME: StewartPlatformControllerTuningExample
EXAMPLETITLE: Stewart Platform Controller Tuning
PRODUCT: MATLAB;Simscape Multibody;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the position controller parameters of a Stewart platform. The Stewart platform is modeled using Simscape™ Multibody™ blocks.


COMPONENT: sldo
EXAMPLENAME: DesignExplorationUsingParameterSamplingCodeExample
EXAMPLETITLE: Design Exploration Using Parameter Sampling (Code)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Sample and explore a design space. You explore the design of a Continuously Stirred Tank Reactor to minimize product concentration variation and production cost. The design includes feed stock uncertainty.


COMPONENT: sldo
EXAMPLENAME: GenerateMATLABCodeForDesignOptimizationProblemsGUIExample
EXAMPLETITLE: Generate MATLAB Code for Design Optimization Problems (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Automatically generate a MATLAB® function to solve a Design Optimization problem. You use the Response Optimizer to define an optimization problem for a hydraulic cylinder design and generate MATLAB code to solve this optimization problem.


COMPONENT: sldo
EXAMPLENAME: RemoveParameterfromsdoParameterSpaceObjectExample
EXAMPLETITLE: Remove Parameter From sdo.ParameterSpace Object
PRODUCT: MATLAB;Simulink Design Optimization;Simulink
DESCRIPTION:
Create an sdo.ParameterSpace object, ps, for the Ac and K parameters of the sdoHydraulicCylinder model.


COMPONENT: sldo
EXAMPLENAME: ScatterPlotofParameterSamplesExample
EXAMPLETITLE: Scatter Plot of Parameter Samples
PRODUCT: MATLAB;Simulink Design Optimization;Simulink
DESCRIPTION:
Sample the Ac and K parameters of the sdoHydraulicCyclinder model. Use a scatter plot to analyze the samples.


COMPONENT: sldo
EXAMPLENAME: SampleContinuousParametersAcrossGridExample
EXAMPLETITLE: Exhaustive Sampling Across a Grid of Parameter Values
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Uses the sdoCSTR model discussed in detail in Design Exploration Using Parameter Sampling (Code). Among the parameters in this model are the reactor cylinder area A and height h. Suppose that you want to test the sensitivity of your design objectives over a grid of values for these parameters. To start, open the model and create param.Continuous objects to represent the two parameters.


COMPONENT: sldo
EXAMPLENAME: SkipModelSimulationBasedOnConstraintViolationGUIExample
EXAMPLETITLE: Skip Model Simulation Based on Parameter Constraint Violation (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Optimize a design and specify parameter-only constraints that prevent the model from being evaluated in an invalid solution space.


COMPONENT: sldo
EXAMPLENAME: AirframeControllerTuningExample
EXAMPLETITLE: Airframe Controller Tuning
PRODUCT: MATLAB;Simulink Control Design;Simulink Design Optimization
DESCRIPTION:
Design two feedback loops in a cascaded control system to track reference signals. The design uses the body rate (q) as an inner feedback loop and the acceleration (az) as an outer feedback signal. This example is based on the Simulink® Control Design™ example Cascaded Multiloop Feedback Design (Simulink Control Design).


COMPONENT: sldo
EXAMPLENAME: OptimizingTimeResponseOfModelUsingParallelComputingExample
EXAMPLETITLE: Optimizing Time-Domain Response of Simulink Models Using Parallel Computing
PRODUCT: MATLAB;Parallel Computing Toolbox;Simulink Design Optimization
DESCRIPTION:
Use parallel computing to optimize the time-domain response of a Simulink® model. You use Simulink Design Optimization™ and Parallel Computing Toolbox™ to tune the gains of a discrete PI controller of a boiler to meet the design requirements. The example also shows how the software automatically handles model file dependencies.


COMPONENT: sldo
EXAMPLENAME: RemoveParametersFromGriddedParameterSpaceExample
EXAMPLETITLE: Remove Parameters from Gridded Parameter Space
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Open the sdoCSTR model and extract continuous parameters A, h, FeedCon0, and FeedTemp0. Assign values to these parameters for gridded sampling and define the parameter space.


COMPONENT: sldo
EXAMPLENAME: ParameterEstimationForAPowerPlantExample
EXAMPLETITLE: Parameter Estimation for Power Plant Excitation System Starting at Steady-State (GUI)
PRODUCT: MATLAB;Simulink;Simulink Design Optimization
DESCRIPTION:
Perform parameter estimation while starting the system in steady state using the example of an excitation system model for a power plant electric generator.


COMPONENT: sldo
EXAMPLENAME: DesignOptimizationUsingLookupTableForGainSchedulingGUIExample
EXAMPLETITLE: Design Optimization Using Lookup Table Requirements for Gain Scheduling (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Impose design requirements on the parameters in a lookup table in the Response Optimizer, and tune the parameters.


COMPONENT: sldo
EXAMPLENAME: PIDTuningWithActuatorConstraintsExample
EXAMPLETITLE: PID Tuning with Actuator Constraints
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to tune the gains of the PID controller (Kp, Ki, and Kd) and optimize the step response of the plant. To view the results, use the following steps.


COMPONENT: sldo
EXAMPLENAME: PitchRateControllerTuningExample
EXAMPLETITLE: Pitch Rate Controller Tuning
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to tune the gains of a Digital Pitch Rate Controller and optimize the response of an Aircraft to a step altitude change. The controller includes state derivative and integral feedback. The controller is tuned to satisfy a 10 percent overshoot and 0.9 second rise time step response characteristic.


COMPONENT: sldo
EXAMPLENAME: SampleContinuousParametersAtSpecifiedValuesExample
EXAMPLETITLE: Sequential Sampling of Specified Parameter Values
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
The example Sample Continuous Parameters Across a Grid of Values shows how to create exhaustive grids of parameter values. Suppose instead that you want to create a set of specified pairs of parameter values (A1,h1), (A2,h2), and so on. To do so, use the sequential method of sampling the gridded parameter space. Open the model and create param.Continuous objects to represent the two parameters.


COMPONENT: sldo
EXAMPLENAME: EngineVolumetricEfficiencySurfaceMatchingExample
EXAMPLETITLE: Engine Volumetric Efficiency Surface Matching
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Generate a lookup table to approximate an engine volumetric efficiency surface using experimental data.


COMPONENT: sldo
EXAMPLENAME: ExploreDesignReliabilityUsingParameterSamplingGUIExample
EXAMPLETITLE: Explore Design Reliability Using Parameter Sampling (GUI)
PRODUCT: MATLAB;Simulink Design Optimization;Statistics and Machine Learning Toolbox
DESCRIPTION:
Use the Sensitivity Analyzer to explore the behavior of a PI controller for a DC motor. The controller is susceptible to variations caused by component tolerances, and the impact on controller reliability is explored.


COMPONENT: sldo
EXAMPLENAME: ServomechanismTuningExample
EXAMPLETITLE: Servomechanism Tuning
PRODUCT: MATLAB;Stateflow;Simulink Design Optimization
DESCRIPTION:
Use Simulink® Design Optimization™ to optimize the position controller parameters for a servomotor piston. This model uses blocks from Stateflow®.


COMPONENT: sldo
EXAMPLENAME: DesignExplorationUsingParameterSamplingGUIExample
EXAMPLETITLE: Design Exploration Using Parameter Sampling (GUI)
PRODUCT: MATLAB;Simulink Design Optimization
DESCRIPTION:
Sample and explore a design space using the Sensitivity Analyzer . You explore the design of a Continuously Stirred Tank Reactor (CSTR) to minimize product concentration variation and production cost. The design must also account for the uncertainty in the temperature and concentration of the input feed to the reactor.


COMPONENT: sldrt
EXAMPLENAME: CANInputOutputWithVNTExample
EXAMPLETITLE: CAN Input/Output with Vehicle Network Toolbox
PRODUCT: MATLAB;Simulink;Simulink Desktop Real-Time;Vehicle Network Toolbox
DESCRIPTION:
Transfer data through CAN bus by using the CAN Pack and CAN Unpack blocks available in Vehicle Network Toolbox block library.


COMPONENT: sldrt
EXAMPLENAME: SldrtSyncModelsByUsingArduinoConnectedIOBdExample
EXAMPLETITLE: Sync Models by Using Arduino Connected I/O Board
PRODUCT: MATLAB;Simulink Desktop Real-Time;Simulink
DESCRIPTION:
Synchronize models using an Arduino Connected I/O board with real time and using Simulink Desktop Real-Time running in Connected IO mode.


COMPONENT: sldrt
EXAMPLENAME: UDPStringMessageExample
EXAMPLETITLE: UDP String Data and Message Handling
PRODUCT: MATLAB;Simulink Desktop Real-Time;Simulink
DESCRIPTION:
Transfer text data by using the UDP communication protocol and store the incoming messages in a FIFO queue.


COMPONENT: sldrt
EXAMPLENAME: HeartRateMonitorExample
EXAMPLETITLE: Heart Rate Monitor
PRODUCT: MATLAB;Simulink Desktop Real-Time;Simulink;DSP System Toolbox
DESCRIPTION:
Use system camera as a heart rate monitor by using Simulink Desktop Real-Time and DSP System Toolbox.


COMPONENT: sldrt
EXAMPLENAME: VideoInputExample
EXAMPLETITLE: Video Input
PRODUCT: MATLAB;Simulink Desktop Real-Time;Simulink
DESCRIPTION:
Get video input and control the displayed video by using the region of interest (ROI) of the video data.


COMPONENT: sldrt
EXAMPLENAME: SldrtCreateARealTimeApplicationExample
EXAMPLETITLE: Create a Real-Time Application
PRODUCT: MATLAB;Simulink Desktop Real-Time;Simulink
DESCRIPTION:
Configure a Simulink model as a real-time application, generate code, and run the application in real time.


COMPONENT: sldv
EXAMPLENAME: ModelCoverageTestGenerationExample
EXAMPLETITLE: Model Coverage Test Generation
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate test cases that achieve complete model coverage for a debouncer. The outcome of each model coverage point in this example model is a test objective. If you configure Simulink Design Verifier to generate the fewest test cases, it will satisfy as many objectives as possible in each test case.


COMPONENT: sldv
EXAMPLENAME: FuelRateControllerLogicExample
EXAMPLETITLE: Fuel Rate Controller Logic
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate test cases that satisfy Decision, Condition, and MCDC coverage. Simulink® Design Verifier™ automatically generates test data and proves properties of models. It produces sequences of input values that satisfy a testing criteria or demonstrate a counterexample of a proof. The configuration options associated with the model specify the objectives of the analysis. When you analyze the model, Simulink Design Verifier uses exhaustive searching techniques to generate input data. When successful, it generates test data and creates a new harness model containing a Signal Editor block with the data values that satisfy the analysis objectives. NOTE: The complexity of this model might prevent test generation from completing in the allotted time. You can stop test generation and generate partial results, or you can extend the time limit by editing the Simulink Design Verifier options.


COMPONENT: sldv
EXAMPLENAME: UsingExistingCoverageDataSubsystemAnalysisExample
EXAMPLETITLE: Using Existing Coverage Data During Subsystem Analysis
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
How Simulink® Design Verifier™ can target its analysis to a single subsystem within a continuous-time closed-loop simulation and generate test cases for missing coverage in that subsystem.


COMPONENT: sldv
EXAMPLENAME: UsingSpecifiedInputMinAndMaxValuesAsConstraintsExample
EXAMPLETITLE: Using Specified Input Minimum and Maximum Values as Constraints
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Use input port minimum and maximum values as analysis constraints by Simulink® Design Verifier™ during both test generation and property proving.


COMPONENT: sldv
EXAMPLENAME: CLfunctionToSupportChangingParametersExample
EXAMPLETITLE: Using Command Line Functions to Support Changing Parameters
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Use Simulink® Design Verifier™ command-line functions to generate test data that incorporates different parameter values.


COMPONENT: sldv
EXAMPLENAME: GenerateTestsModelBlockComponentUsingDefaultSimulationExample
EXAMPLETITLE: Generate Tests for Model Block Component by Using Default Simulation
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Use Simulink® Design Verifier™ to generate test cases for a Model block by using a default top model simulation.


COMPONENT: sldv
EXAMPLENAME: AnalyzingResultsForADeadLogicAnalysisExample
EXAMPLETITLE: Analyzing the Results for a Dead Logic Analysis
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Demonstrates how to isolate potential causes of dead logic using the sldvexCommonCausesOfDeadLogic model. Dead logic detection finds unreachable objectives in the model that cause the model element to remain inactive.


COMPONENT: sldv
EXAMPLENAME: FlipFlopTestGenerationExample
EXAMPLETITLE: Flip Flop Test Generation
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate test cases that achieve complete model coverage for a flip-flop. The outcome of each model coverage point in this example model is a test objective. If you configure Simulink Design Verifier to generate the fewest test cases, it will satisfy as many objectives as possible in each test case.


COMPONENT: sldv
EXAMPLENAME: AnalyzeAnExportFunctionModelWithFunctionCallSubsystemsExample
EXAMPLETITLE: Analyze Export-Function Model with Function-Call Subsystems
PRODUCT: MATLAB;Simulink Design Verifier;AUTOSAR Blockset
DESCRIPTION:
Analyze a model which consists of periodic function-call subsystems. This example uses the AUTOSAR example model sldvExportFunction_autosar_multirunnables.


COMPONENT: sldv
EXAMPLENAME: ConfiguringSFunctionForTestCaseGenerationExample
EXAMPLETITLE: Configuring S-Function for Test Case Generation
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Compile an S-Function to be compatible with Simulink® Design Verifier™ for test case generation. Simulink Design Verifier supports S-Functions that are:


COMPONENT: sldv
EXAMPLENAME: AchieveCoverageOnModelsWithVariablesizeInputsExample
EXAMPLETITLE: Achieve Coverage in Models with Variable-Size Inputs
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Achieve model coverage in models with variable-size input signals by using Simulink Design Verifier™.


COMPONENT: sldv
EXAMPLENAME: DetectDataStoreAccessViolationsExample
EXAMPLETITLE: Detect Data Store Access Violations in a Model
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Detect data store access violations and review the analysis results. The sldvexDataStoreAccessViolations example model consists of Data Store Memory blocks that define the alpha and beta data stores. In the example model, the Write Subsystem writes the data to the data store by using Data Store Write blocks and the Read Subsystem reads the data from the data store by using the Data Store Read blocks.


COMPONENT: sldv
EXAMPLENAME: CruiseControlTestGenerationExample
EXAMPLETITLE: Cruise Control Test Generation
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate test cases that achieve complete model coverage. By default, Simulink® Design Verifier™ generates test cases that satisfy objectives in the fewest steps. One of the test objectives forces the discrete integrator in the PI controller to exceed its upper limit. When you run Simulink Design Verifier without constraints, the limit is exceeded in a single step by forcing speed to be 500. The constraint on speed limits the values in test cases between 0 and 100. This forces the test cases to take several samples to exceed the integrator limit.


COMPONENT: sldv
EXAMPLENAME: BlockReplacementsForUnsupportedBlocksExample
EXAMPLETITLE: Block Replacements for Unsupported Blocks
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Use Simulink® Design Verifier™ functions to replace unsupported blocks and how to customize test vector generation for specific requirements.


COMPONENT: sldv
EXAMPLENAME: AchieveMissingCoverageInCustomCodeExample
EXAMPLETITLE: Achieve Missing Coverage in Custom Code
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Test for missing coverage in custom code. You can use these steps to also test for missing coverage in external C code. If you simulate a model with custom code through C Caller block, C Caller Library, or coder.ceval function, then coverage of the custom code is reported. If the code does not achieve full coverage, you can use Simulink® Design Verifier™ to generate test cases that achieve full coverage. You can then use Simulink® Test Manager™ to perform unit testing by generating test cases only for the custom code.


COMPONENT: sldv
EXAMPLENAME: GenerateTestCasesForModelsInitializeResetTerminateBlocksExample
EXAMPLETITLE: Generate Test Cases for Model with Initialize, Reset, and Terminate Blocks
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate tests for a test harness that models an event schedule to trigger execution of Initialize, Reset, and Terminate function block contents.


COMPONENT: sldv
EXAMPLENAME: IdentifyEffectOfApproximationsThroughValidationResultsExample
EXAMPLETITLE: Identify the Effect of Approximations Through Validation Results
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
How approximations affect the objectives status of the Switch block. In the sldvApproximationsExample model, the calculations 1./3 and 2./3 in the Constant block result in Floating-Point to Rational Number Conversion during analysis.


COMPONENT: sldv
EXAMPLENAME: GenerateTestCasesForSubsystemsForSoftwareintheLoopModeExample
EXAMPLETITLE: Generate Test Cases for Subsystems for Software-in-the-Loop Mode
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate test cases for atomic subsystems in software-in-the-loop (SIL) mode by using the sldv_cruise_control_ats model.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingMATLABFunctionBlockExample
EXAMPLETITLE: Property Proving Using MATLAB Function Block
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Verify the seat belt reminder design model. The Safety Properties block below it contains a property specified in MATLAB® that indicates when the icon should be active. Simulink® Design Verifier™ analyzes the design model and safety property to prove correctness or to identify counterexamples. In this model, the property is violated because the design implicitly assumes that the KEY input starts at 0 and changes by increments of 1.


COMPONENT: sldv
EXAMPLENAME: DetectOutOfBoundArrayAccessModelExample
EXAMPLETITLE: Detect Out of Bound Array Access Example Model
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Detect out of bound array access errors and review the analysis results. In the sldvdemo_array_bounds example model, the ComputeIndex MATLAB Function block uses the input signal values to determine range of indices with minimum minIdx and maximum maxIdx . The ArrayOp_Matlab, ArrayOp_MAL, and ArrayOp_SF blocks use the set of integer indices between minIdx and maxIdx to access array elements and perform array operations.


COMPONENT: sldv
EXAMPLENAME: AnalyzeSubsystemsThatReadFromGlobalDataStorageExample
EXAMPLETITLE: Analyze Subsystems That Read from Global Data Storage
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
A data store is a repository to which you can write data, and from which you can read data, without having to connect an input or output signal directly to the data store.


COMPONENT: sldv
EXAMPLENAME: DebounceTemporalPropertiesExample
EXAMPLETITLE: Debounce Temporal Properties
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Model temporal system requirements for property proving and test case generation using Simulink® Design Verifier™ Temporal Operator blocks.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingForThrustReverserExample
EXAMPLETITLE: Property Proving Workflow for Thrust Reverser
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Verify safety properties in a thrust reverser design model. The Properties block below it contains four safety properties. Simulink® Design Verifier™ analyzes the design model and safety properties to prove correctness or to identify counterexamples. The use of model referencing eliminates the need to add verification content to the design model, allowing the verification content to exist independently from the design.


COMPONENT: sldv
EXAMPLENAME: PowerWindowControllerTemporalPropertiesExample
EXAMPLETITLE: Power Window Controller Temporal Properties
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Model temporal system requirements in a power window controller model for property proving and test case generation using Simulink® Design Verifier™ Temporal Operator blocks.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingForFixedPointCruiseControlExample
EXAMPLETITLE: Property Proving Workflow for Fixed-Point Cruise Control with Block Replacements
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Prove properties in a fixed-point cruise control algorithm. It references the design model using model reference so that the original design model is unchanged. A block replacement rule specifies the property that checks if an overflow is possible. The verification subsystem specifies an assumption on the range of the speed input during property proving. This model configures Simulink Design Verifier to apply a block replacement to the Sum block that feeds the outport of the fixed-point PI Controller in the referenced model and return a counterexample that demonstrates an overflow.


COMPONENT: sldv
EXAMPLENAME: ExcludeAndJustifyObjectivesForDesignErrorDetectionExample
EXAMPLETITLE: Exclude and Justify Objectives for Design Error Detection
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Exclude a model object from Simulink® Design Verifier™ analysis by using a coverage filter file. After performing analysis, you can justify objectives by using Analysis Filter viewer, update the filter file, you can justify objectives by using Analysis Filter explorer, update the filter file, you can justify objectives by using Simulink® Design Verifier™ Filter Explorer, update the filter file, and review the analysis results.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingWorkflowForCruiseControlExample
EXAMPLETITLE: Property Proving Workflow for Cruise Control
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Find a property violation by using Simulink® Design Verifier™ property proving analysis. You model safety requirements as properties and then verify the design model against requirements.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingUsingMATLABTruthTableBlockExample
EXAMPLETITLE: Property Proving Using MATLAB Truth Table Block
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Verify the seat belt reminder design model referenced in the top block above. The Safety Properties block below it contains a property specified in MATLAB Truth Table that indicates when the SeatBeltIcon output should be active. Simulink Design Verifier analyzes the design model and safety property to prove correctness or to identify counterexamples. In this model, the property is proven under the explicit assumption that the KEY input starts at 0 and changes by increments of 1.


COMPONENT: sldv
EXAMPLENAME: DebugEnhancedMCDCUsingModelSlicerExample
EXAMPLETITLE: Debug Enhanced Modified Condition Decision Coverage Using Model Slicer
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Find the Simulink Design Verifier generated objectives related to a specific model object using Model Slicer.


COMPONENT: sldv
EXAMPLENAME: DesignErrorDetectionForIntegerOverflowErrorsExample
EXAMPLETITLE: Detect Integer Overflow Errors
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Detect integer overflow errors in a model by using design error detection analysis. Simulink® Design Verifier™ identifies the model constructs that may result in integer overflows and then either proves that the integer overflow cannot occur during simulation or generates test cases that demonstrates the integer overflow error.


COMPONENT: sldv
EXAMPLENAME: DefiningExtendingExistingTestsCasesExample
EXAMPLETITLE: Defining and Extending Existing Tests Cases
PRODUCT: MATLAB;Simulink Design Verifier;Stateflow;Fixed-Point Designer
DESCRIPTION:
How Simulink® Design Verifier™ can extend test cases with additional time steps to efficiently generate complete test suites.


COMPONENT: sldv
EXAMPLENAME: EnhanceModelCoverageGeneratingTestCasesOlderReleaseModelExample
EXAMPLETITLE: Enhance Model Coverage by Generating Test Cases for Older Release Model
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Upgrade model coverage of a model created in R2015b. You use test generation for supported S-functions available in the latest release.


COMPONENT: sldv
EXAMPLENAME: CreatingAndExecutingTestCasesExample
EXAMPLETITLE: Creating and Executing Test Cases
PRODUCT: MATLAB;Simulink Design Verifier;Simulink Coder;Embedded Coder;Stateflow
DESCRIPTION:
Use Simulink® Design Verifier™ functions to log input signals, create a harness model, generate test cases for missing coverage, merge harness models, and execute test cases.


COMPONENT: sldv
EXAMPLENAME: AnalyzeFunctionCallSubsystemsExample
EXAMPLETITLE: Analyze Function-Call Subsystems
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
A function-call subsystem is a triggered subsystem whose execution is determined by logic internal to a C MEX S-function instead of by the value of a signal. Function-call subsystems are always atomic.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingWithAnAssumptionBlockExample
EXAMPLETITLE: Property Proving with an Assumption Block
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Perform a Simulink® Design Verifier™ property proof using a Proof Assumption block. It attempts to prove that when the sum of the current and six previous input values is greater than 6, the output equals 2. The model includes a Proof Assumption block that constrains the input to be 0 or 1. Simulink Design Verifier searches for violations of 20 or fewer time steps. It is unable to find a violation because the property is valid under the assumption.


COMPONENT: sldv
EXAMPLENAME: ParameterIdentificationExample
EXAMPLETITLE: Generate Parameters Values
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Tune parameters using parameter configuration file for Simulink® Design Verifier™ analysis. The model contains the parameter control_mode that enables the active controller and selects its output to be the model output. Simulink Design Verifier treats this parameter as an input that is constrained to be either 1 or 2 and generates the appropriate value for each test case.


COMPONENT: sldv
EXAMPLENAME: AnalyzeGlobalSimulinkFunctionExample
EXAMPLETITLE: Analyze Global Simulink Function
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
A Simulink® function is a computational unit that calculates a set of outputs when provided with a set of inputs.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingWithAnInvalidPropertyExample
EXAMPLETITLE: Property Proving with an Invalid Property
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Find an invalid property using Simulink® Design Verifier™ property proving analysis. It attempts to prove that when the sum of the current and six previous input values is greater than 6, the output equals 2. In this case, the property is invalid because a single large input value (e.g. 255) causes the sum to be greater than 6. Simulink Design Verifier produces a counterexample that demonstrates the violation.


COMPONENT: sldv
EXAMPLENAME: GenerateTestCasesForCoverageAnalysisExample
EXAMPLETITLE: Generate Test Cases for Coverage Analysis
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
The analysis results give detailed descriptions of the coverage objectives for each model item and generated test cases for all satisfied objectives. You simulate the generated test cases to measure model coverage.


COMPONENT: sldv
EXAMPLENAME: DesignAndVerifyPropertiesInAModelExample
EXAMPLETITLE: Design and Verify Properties in a Model
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
You can use Simulink® Design Verifier™ to model design requirements as properties and then prove properties in a model. To verify that the properties associated with the model requirements hold under all possible input values, use property proving analysis. If the requirement fails, Simulink Design Verifier provides counterexamples to debug the failure.


COMPONENT: sldv
EXAMPLENAME: PropertyProvingWithMultiplePropertiesExample
EXAMPLETITLE: Property Proving with Multiple Properties
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Perform a property proving analysis with multiple properties. The model is configured for the analysis to attempt to prove that:


COMPONENT: sldv
EXAMPLENAME: TestObjectiveBlockExample
EXAMPLETITLE: Test Objective Block
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
The use of two custom Test Objective blocks. The block "True" forces the output signal to be 2. The block "Edge" inside "Masked Objective" specifies that the output signal transition from 2 to 1.


COMPONENT: sldv
EXAMPLENAME: SimulateHarnessModelUsingSignalEditorSourceExample
EXAMPLETITLE: Simulate Harness Model with Signal Editor Inputs Block
PRODUCT: MATLAB;Simulink Design Verifier
DESCRIPTION:
Generate model coverage report by simulating the test harness model with the Signal Editor Inputs block. You can simulate a single test case or counterexample by selecting the active scenario in the Signal Editor dialog box. For more information see, Simulate Harness Model by Using the Signal Editor Inputs Block.


COMPONENT: slrealtime
EXAMPLENAME: SlrtBinaryEncodeDecodeResyncLoopTestExample
EXAMPLETITLE: Binary Encoding/Decoding Resync Loopback Test
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Use the ability of the FIFO Read BINARY block to handle messages that are interrupted and only partially complete.


COMPONENT: slrealtime
EXAMPLENAME: SlrtAddRS232BlocksExample
EXAMPLETITLE: Add RS-232 Blocks
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
When you want to use the serial ports on the target computer for serial I/O, add RS-232 Legacy Serial Port or Legacy Serial Port F subsystem blocks to your Simulink® model.


COMPONENT: slrealtime
EXAMPLENAME: SlrtCreateUpdateInstPanelForStateflowCarExample
EXAMPLETITLE: Create and Update Instrument Panel for Stateflow Car Transmission
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder;Stateflow
DESCRIPTION:
Configure and update an App Designer instrument panel app for a Simulink Real-Time car transmission application.


COMPONENT: slrealtime
EXAMPLENAME: SlrtASCIIEncodeDecodeResyncLoopbackTestExample
EXAMPLETITLE: ASCII Encoding/Decoding Resync Loopback Test
PRODUCT: MATLAB;Simulink Real-Time;Simulink Coder;Simulink
DESCRIPTION:
Use the ability of the FIFO Read HDRS block to resynchronize after being repeatedly disabled and apply this ability to resolve errors such as when a message is only partially complete at the time the read is attempted.


COMPONENT: slrealtime
EXAMPLENAME: SlrtEtherCATAsyncSoeSscInOrderExample
EXAMPLETITLE: EtherCAT Protocol Sequenced Writing SoE Subordinate Device Configuration Variables
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder;MATLAB Coder
DESCRIPTION:
Use SoE blocks and a simple state machine to write configuration values to variables that can only be written before going to EtherCAT Op state.


COMPONENT: slrealtime
EXAMPLENAME: SlrtAddAppDesignerAppToInvertedPendulumModelExample
EXAMPLETITLE: Add App Designer App to Inverted Pendulum Model
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Stream signal signals to an App Designer instrument panel app from a Simulink Real-Time application.


COMPONENT: slrealtime
EXAMPLENAME: SlrtSaveCurrentSetOfRealTimeApplicatioParametersExample
EXAMPLETITLE: Save Current Set of Real-Time Application Parameters
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
To save a set of parameters from a real-time application to a parameter set file, use the saveParamSet function. The real-time application can be loaded or running.


COMPONENT: slrealtime
EXAMPLENAME: SlrtControlColorOfLampOnInstrumentPanelAppGeneratorExample
EXAMPLETITLE: Control Color of Lamp on Instrument Panel by Using App Generator
PRODUCT: MATLAB;Simulink Real-Time;Simulink
DESCRIPTION:
Connect a lamp indicator on an instrument panel from App Generator, connect the lamp instrument to the real-time application, and control the color of the lamp.


COMPONENT: slrealtime
EXAMPLENAME: SlrtMonitorCPUOverloadRateExample
EXAMPLETITLE: Monitor CPU Overload Rate
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Design a model that uses the SLRT Overload Options block to monitor the rate at which CPU overloads occur.


COMPONENT: slrealtime
EXAMPLENAME: SlrtEtherCATAsyncCoeCycleExample
EXAMPLETITLE: EtherCAT Protocol Sequenced Writing CoE Subordinate Device Configuration Variables
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder;MATLAB Coder
DESCRIPTION:
Use CoE blocks and a simple state machine to write configuration values to variables that can only be written before going to EtherCAT Op state.


COMPONENT: slrealtime
EXAMPLENAME: SlrtControlColorOfLampOnInstrumentPanelExample
EXAMPLETITLE: Control Color of Lamp on Instrument Panel by Using MATLAB®
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Connect a lamp indicator on an instrument panel, connect the lamp instrument to the real-time application, and control the color of the lamp.


COMPONENT: slrealtime
EXAMPLENAME: SlrtUdpDataExUsingSharedEthernetBoardExample
EXAMPLETITLE: UDP Data Exchange by Using Shared Ethernet Board
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Learn about UDP communication via a connection that is shared between the development and target computers.


COMPONENT: slrealtime
EXAMPLENAME: SlrtConcurrentExecutionExample
EXAMPLETITLE: Concurrent Execution on Simulink Real-Time
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder;MATLAB Coder
DESCRIPTION:
Apply explicit partitioning to enhance concurrent execution of a real-time application that you generate by using Simulink Real-Time.


COMPONENT: slrealtime
EXAMPLENAME: SlrtEtherCATNotifyResetExample
EXAMPLETITLE: EtherCAT Protocol Detect Network Failure and Reset
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder;MATLAB Coder
DESCRIPTION:
Use the EtherCAT Notifications block to detect a failure in the connected network and to restart the network when the failure is corrected.


COMPONENT: slrealtime
EXAMPLENAME: SlrtExecutionProfilingForRealTimeApplicationsExample
EXAMPLETITLE: Execution Profiling for Real-Time Applications
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Profile the task execution time and function execution time of your real-time application running on the target computer.


COMPONENT: slrealtime
EXAMPLENAME: ApplyPersistentVariablesInRealTimeAppsExample
EXAMPLETITLE: Apply Persistent Variables in Real-Time Applications
PRODUCT: MATLAB;Simulink Real-Time;Simulink;Simulink Coder
DESCRIPTION:
Apply Simulink Real-Time persistent variables to preserve variable values when the real-time application stops or the target computer is powered off.


COMPONENT: slrealtime
EXAMPLENAME: SlrtDataLoggingWithSimulationDataInspectorSDIExample
EXAMPLETITLE: Data Logging with Simulation Data Inspector (SDI)
PRODUCT: MATLAB;Simulink;MATLAB Coder;Simulink Coder;Simulink Real-Time
DESCRIPTION:
Use a Simulink® Real-Time™ log of signal data and the Simulation Data Inspector. Signals are logged during model execution.


COMPONENT: slrequirements
EXAMPLENAME: MigratingRMIDataToSimulinkRequirementsExample
EXAMPLETITLE: Migrating Requirements Management Interface Data to Requirements Toolbox
PRODUCT: MATLAB;Simulink;Requirements Toolbox;Stateflow
DESCRIPTION:
Update Requirements Management Interface (RMI) links to the format used by the Requirements Editor .


COMPONENT: slrequirements
EXAMPLENAME: RedirectDirectLinksToImportedRequirementsByAPIExample
EXAMPLETITLE: Redirect Direct Links to Imported Requirements Programmatically
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
Programmatically redirect the link destinations for direct links from an external document to a corresponding imported requirement.


COMPONENT: slrequirements
EXAMPLENAME: HowToIncludeLinkedRequirementsDetailsInGeneratedReportExample
EXAMPLETITLE: How to Include Linked Requirements Details in Generated Report
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
The requirements report is a feature in RMI that scans the Simulink model for links to external requirements documents and generates a report.


COMPONENT: slrequirements
EXAMPLENAME: ReqTableAssumptionsUsageExample
EXAMPLETITLE: Use Assumptions in an Example Model
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Uses assumptions to evaluate the requirements for a simple car ignition system to establish the physical limitations of the model. By including assumptions, the block constrains the possible values of the data used in the requirements.


COMPONENT: slrequirements
EXAMPLENAME: AssociateTraceabilityInformationWithMATLABCodeInSimulinkExample
EXAMPLETITLE: Associate Traceability Information with MATLAB Code Lines in Simulink
PRODUCT: MATLAB;Simulink
DESCRIPTION:
Traceability management support in the MATLAB Editor is an extension of the Simulink-based Requirements Management Interface to allow associations between MATLAB code lines and external artifacts.


COMPONENT: slrequirements
EXAMPLENAME: CaptureModelAsRequirementsAndCreateLinksExample
EXAMPLETITLE: Capture Model as Requirements and Create Links
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
In this step, you use the Requirements Toolbox™ programmatic interface to capture elements from your Simulink® model into a set of proxy slreq.Requirement objects that have the same hierarchy as your model. You can then use the Description and Rationale properties of the proxy requirement objects to document each element of the design. The example also shows how to create links between the model elements and the proxy requirement objects for traceability.


COMPONENT: slrequirements
EXAMPLENAME: ReqTableBlockWithChangeDetectionExample
EXAMPLETITLE: Example of Requirements Table Block with Change Detection
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
How the operators hasChanged , hasChangedFrom , and hasChangedTo detect specific changes in an input signal. In this example, a Ramp (Simulink) block sends a discrete, increasing time signal to a Requirements Table block.


COMPONENT: slrequirements
EXAMPLENAME: GeneratorExampleModelExample
EXAMPLETITLE: Generate Model Behavior
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
You can also use the Requirements Table block to execute actions when the model meets corresponding preconditions. You specify the action for each requirement by using the Action column.


COMPONENT: slrequirements
EXAMPLENAME: ImportRequirementsAndReuseExistingLinksExample
EXAMPLETITLE: Import Requirements and Reuse Existing Links
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
In this step, you use the Requirements Toolbox™ programmatic interface to import requirements from a Microsoft® Word document and create links to the Simulink® model. Then, you import another set of requirements and reuse the existing links by migrating the link destinations to the most recently imported requirements.


COMPONENT: slrequirements
EXAMPLENAME: TemporalLogicInRequirementsTableBlockExample
EXAMPLETITLE: Example Using Temporal Logic Operators
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
A Requirements Table block that uses temporal logic operators to check an input signal. The Requirements Table block checks the value of the input signal and the simulation time to execute different values for the two outputs.


COMPONENT: slrequirements
EXAMPLENAME: ChildRequirementsModelExample
EXAMPLETITLE: Use Child Rows in an Example Model
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Uses a Requirements Table block that has child requirements. The model tests a signal and outputs two values if the model behavior meets the parent and child requirements.


COMPONENT: slrequirements
EXAMPLENAME: UseSemanticRowsExample
EXAMPLETITLE: Use Semantic Rows in an Example Model
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Uses a Requirements Table block with semantic requirements. The model tests two signals and adjusts the output if the model behavior meets the semantic requirement preconditions.


COMPONENT: slrequirements
EXAMPLENAME: LinkSourceDestStructToEntityExample
EXAMPLETITLE: Convert Link Source and Destination to Model Entity
PRODUCT: MATLAB;Requirements Toolbox;Simulink;Stateflow
DESCRIPTION:
Get the structure containing unique requirement source and destination information, then convert the structure information to the specific source and destination model entity.


COMPONENT: slrequirements
EXAMPLENAME: ValidateReqsUsingSLDVExample
EXAMPLETITLE: Validate Requirements by Analyzing Model Properties
PRODUCT: MATLAB;Requirements Toolbox;Simulink Design Verifier;Simulink;Stateflow;Simulink Check
DESCRIPTION:
Analyze a control system model for adherence to requirements modeled as properties, and investigate property violations by using dependency analysis.


COMPONENT: slrequirements
EXAMPLENAME: CreateNewRequirementLinkAndSaveExternallyExample
EXAMPLETITLE: Create New Requirement Link and Save Externally
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
Add a requirement link to an existing example model, and save the model requirements traceability data in an external file.


COMPONENT: slrequirements
EXAMPLENAME: ProgrammaticallyResolveBrokenLinksExample
EXAMPLETITLE: Programmatically Repair Broken Links
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
In this step, you use the Requirements Toolbox™ programmatic interface to repair broken links when the specified ID of the link sources no longer exists.


COMPONENT: slrequirements
EXAMPLENAME: ManageReqsFaultTolerantFuelControlSystemIBMRationalDOORSExample
EXAMPLETITLE: Managing Requirements for Fault-Tolerant Fuel Control System (IBM DOORS)
PRODUCT: MATLAB;Simulink;Requirements Toolbox
DESCRIPTION:
The Requirements Management Interface (RMI) provides tools for creating and reviewing links between Simulink objects and requirements documents.


COMPONENT: slrequirements
EXAMPLENAME: AnalyzeFormalRequirementsEVSELockExample
EXAMPLETITLE: Analyze Formal Requirements of an Electric Vehicle Charger Locking Mechanism
PRODUCT: MATLAB;Requirements Toolbox;Simulink;Simulink Design Verifier
DESCRIPTION:
Use a Requirements Table block and Simulink Design Verifier to construct, analyze, and update formal requirements of an electric vehicle charging station locking mechanism.


COMPONENT: slrequirements
EXAMPLENAME: LoadALinkSetExample
EXAMPLETITLE: Load Link Set
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
Load a link set that contains direct links between requirements in Microsoft® Word and model elements in Simulink®.


COMPONENT: slrequirements
EXAMPLENAME: LinkToRequirementsInMicrosoftWordDocumentsExample
EXAMPLETITLE: Link Requirements in Microsoft Word to Simulink Blocks
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
In this example, you link requirements from a document in Microsoft® Word to Simulink® blocks. Open the slvnvdemo_fuelsys_officereq model.


COMPONENT: slrequirements
EXAMPLENAME: LinkRequirementsInExcelToSimulinkBlocksExample
EXAMPLETITLE: Link and Navigate to Requirements in Excel from Simulink blocks
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Link requirements authored in Microsoft Excel to Simulink blocks and how to navigate between the requirements and the design by using direct links and external backlinks.


COMPONENT: slrequirements
EXAMPLENAME: DurationColumnExample
EXAMPLETITLE: Example Using Duration Column
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
The example uses a Requirements Table block to check that an input signal satisfies temporally dependent requirements. The block uses the Duration column to specify how long a requirement must be valid before executing outputs.


COMPONENT: slrequirements
EXAMPLENAME: ImplementRMIExtensionForSupportOfCustomDocTypeExample
EXAMPLETITLE: Define Custom Document Interface for Microsoft PowerPoint
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Requirements Management Interface (RMI) provides tools for creating and reviewing links between model-based design elements and requirements documents.


COMPONENT: slrequirements
EXAMPLENAME: CreateASurrogateModelForTheFaultTolerantControlSystemExample
EXAMPLETITLE: Create Surrogate Module for a Fault-Tolerant Control System
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
Use a surrogate module in IBM® DOORS® to create direct links from a Simulink® model to requirements in an IBM DOORS module, and how to navigate the links.


COMPONENT: slrequirements
EXAMPLENAME: ObserverExampleModelExample
EXAMPLETITLE: Observe Model Behavior
PRODUCT: MATLAB;Requirements Toolbox;Simulink
DESCRIPTION:
You can use the Requirements Table block to observe the model behavior without executing actions. If the model behavior does not satisfy a precondition, the block does not check the associated postcondition. If the model behavior does not satisfy the postcondition for a requirement when the precondition is satisfied, the Requirements Table block produces a warning in the Diagnostic Viewer. To use the Requirements Table block to observe requirements, use the preconditions to specify model input behavior, and use the postconditions to specify model output behavior. To differentiate between the model inputs and outputs, enable the Treat as design model output for analysis property in the Property Inspector for the data specified in the postconditions. See Treat as design model output for analysis.


COMPONENT: slrequirements
EXAMPLENAME: LoadRequirementSetAndLinkSetForRequirementsTableBlockExample
EXAMPLETITLE: Load Requirement Set and Link Set for Requirements Table Block
PRODUCT: MATLAB;Requirements Toolbox
DESCRIPTION:
Load the Simulink model®, requirement set, and link set associated with a Requirements Table block in a Simulink® model.


COMPONENT: sm
EXAMPLENAME: FiveBarRobotExample
EXAMPLETITLE: Perform Forward and Inverse Kinematics on a Five-Bar Robot
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Use the KinematicsSolver object to perform forward kinematics (FK) and inverse kinematics (IK) on a five-bar robotic mechanism. First, the example demonstrates how to perform FK analyses to calculate a singularity-free workspace for a five-bar robot. Then the example shows how to perform IK analyses to compute the motor angles that correspond to an end-effector trajectory within that workspace.


COMPONENT: sm
EXAMPLENAME: DocConstrainPointToCurveExample
EXAMPLETITLE: Constrain a Point to a Curve
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Use a Point on Curve Constraint block to restrict the motion of an aircraft flap to a curved trajectory specified in a Spline block.


COMPONENT: sm
EXAMPLENAME: CompoundBodyExample
EXAMPLETITLE: Creating a Complex Part
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
A moderately complex mechanical link with a frame at each end and a reference frame at the center. The link has a hole at one end and a peg at the other end. The link is a composite of three simple solids.


COMPONENT: sm
EXAMPLENAME: PointCloudContactExample
EXAMPLETITLE: Contact Modeling - Ball on Grid Surface
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
A ball and dumbbell rolling down on an L-shaped surface. Grid Surface block is used to generate the L-shaped membrane. Point Cloud blocks are used to model the contact between the ball/dumbbell and the surface. The number of point blocks can be controlled by varying the point cloud density. This example demonstrates the capabilities of Grid Surface and Point Cloud blocks to model contacts between complex shaped bodies.


COMPONENT: sm
EXAMPLENAME: RunFKOnHumanoidRobotArmExample
EXAMPLETITLE: Run Forward Kinematics on Humanoid Robot Arm
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Compute forward kinematics for the left arm of a humanoid robot. Specifically, it computes the position of the robot wrist for specified angles of the shoulder and elbow joints.


COMPONENT: sm
EXAMPLENAME: FourPostTestrigExample
EXAMPLETITLE: Full Vehicle on Four Post Testrig
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a passenger vehicle on a four-post testrig. The posts move up and down to replicate the vertical movement of the wheels as it travels along a road. The simulation results and animation show the response of the vehicle body and suspension as it is subjected to the motions from the testrig. The roll and pitch of the vehicle body can be observed, and by varying the inputs wheel hop frequencies can be determined. The vehicle model can be configured to use different suspension types for the front suspension with different linkage combinations.


COMPONENT: sm
EXAMPLENAME: ElectricalInterfaceExample
EXAMPLETITLE: Rotational Interface: Electrically Operated Bread Slicer
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
This model simulates an electrically operated 1-DOF bread slicing mechanism. The electrical circuit and motor are modeled in Simscape™ while the bread slicing mechanism is modeled in Simscape Multibody™. The model uses a Rotational Multibody Interface block to connect the Simscape components to a Revolute Joint block in Multibody.


COMPONENT: sm
EXAMPLENAME: ImportedURDFExample
EXAMPLETITLE: Humanoid Robot
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Has been imported from a URDF file using the smimport command. The URDF file "Humanoid.urdf" and the STEP files that visualize the robot parts were used to create this example. Motion actuation of the joints was manually added to the imported model to make the robot perform interesting movements.


COMPONENT: sm
EXAMPLENAME: CrossSlideTableExample
EXAMPLETITLE: Cable-Driven Cross Slide Table
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models an XY cross positioning table that uses a cable-driven mechanism. A single cable wraps around seven different pulleys and converts the rotational angle of the two input pulleys to the x-y position of the table.


COMPONENT: sm
EXAMPLENAME: SpatialContactForceBusExample
EXAMPLETITLE: Using the Spatial Contact Force Block - Bumper Car
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
A toy bumper car traveling down a series of ramps while undergoing intermittent collisions. Spatial Contact Force blocks are used to model the friction and normal forces between every pair of geometries that may potentially come into contact during the simulation (e.g., between one of the car's wheels and a railing). Each Spatial Contact Force block is able to generate brief high-impact contact forces to model collisions, as well as sustained contact forces to model rolling and sliding.


COMPONENT: sm
EXAMPLENAME: CableRobotExample
EXAMPLETITLE: Cable Robot
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a cable robot. The robot comprises 8 independent belt-cable circuits which control the 6 degrees-of-freedom of the mover. A ball is dropped from a fixed height down the center axis of the mechanism. The mover initially starts directly below the ball and the contact is modeled between the mover and the ball such that the ball bounces elastically when striking the mover. The objective of the mover is to perform increasingly complex maneuvers between successive bounces of the ball. The mover is motion actuated from which the necessary cable, pulley, and motor spool kinematics are computed.


COMPONENT: sm
EXAMPLENAME: DynamicCamerasExample
EXAMPLETITLE: Configuring Dynamic Cameras - Vehicle Slalom
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Illustrates the use of dynamic cameras to view a vehicle traversing a slalom course. The vehicle accelerates from stationary to a fixed speed and then enters the slalom course. Upon exiting, the vehicle decelerates back to stationary before the end of the road. The model has four dynamic cameras: three with tracking parameterization and one with keyframes. The tracking cameras show the front and side views of the vehicle from a fixed offset relative to the vehicle, along with the view from the driver's perspective. The keyframed camera shows a sweeping view of the vehicle maneuver.


COMPONENT: sm
EXAMPLENAME: PointOnCurveExample
EXAMPLETITLE: Using the Point-On-Curve Block: Flapping Wing Mechanism
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
This model simulates a barrel cam based wing flapping mechanism. This is a one degree of freedom mechanism and the two wings flap in sync with each other. The Spline and Point On Curve blocks have been used to model the Barrel Cam mechanism that actuates the flapping motion of the wings.


COMPONENT: sm
EXAMPLENAME: ModalReductionForFlexibleBodiesExample
EXAMPLETITLE: Using Modal Reduction in Flexible Bodies to Improve Simulation Performance
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Use modal reduction for performance acceleration in models with flexible bodies. The model in this example uses a rectangular beam for simplicity, but you can apply modal reduction to all flexible body blocks. By only retaining the lowest-frequency modes of vibration of flexible bodies in your multibody system, you can speed up simulation while maintaining sufficient fidelity.


COMPONENT: sm
EXAMPLENAME: RigidTransformFrameTreeExample
EXAMPLETITLE: Creating Frames Using Rigid Transforms
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
The correspondence of coordinate frames to connection lines and frame ports. It highlights the Rigid Transform block as the fundamental method to rigidly relate nonidentical frames. The network reference frame is the world frame, located at the center of the bottom face of the cube. The other frames are the frames at the eight vertices of the cube, one at the center of the top face, and two on the upper curved section.


COMPONENT: sm
EXAMPLENAME: TranslationalInterfaceExample
EXAMPLETITLE: Translational Interface: Radial Engine with Gas Force Model
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
This model simulates a five cylinder radial engine. The pressure dynamics inside the cylinders are modelled using the Simscape™ Foundation Library gas and mechanical translational domains. The 3D mechanical components are modelled using Simscape Multibody™. See inside any of the blocks called "Force Model" to see how the 1D Simscape and 3D Multibody parts of the model are interfaced. The pressure model is an ideal pressure source which applies pressure based on the crank angle. This model can be replaced with a more realistic pressure model of the cylinder chamber. The cylinders fire in the sequence - A C E B D providing a power stroke every 144 deg of crank rotation.


COMPONENT: sm
EXAMPLENAME: DocImportedURDFModelExample
EXAMPLETITLE: Import a URDF Humanoid Model
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
You can import a URDF model into the Simscape™ Multibody™ environment. The import process occurs in a single step based on the smimport function. The smimport function converts the URDF model directly into an equivalent Simscape Multibody model.


COMPONENT: sm
EXAMPLENAME: VehicleSuspensionTemplatesExample
EXAMPLETITLE: Vehicle Suspension System Templates
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Includes templates for three common types of automotive suspension systems: double wishbone, MacPherson, and pushrod. Tires attached to the suspension systems are mounted on platforms that can independently move up and down. Each platform has a PD controller that allows it to simulate a desired road profile. For a given pair of road profiles, the resultant roll and bounce of the chassis can be studied and the suspension parameters can be tuned for optimal performance.


COMPONENT: sm
EXAMPLENAME: BevelGearConstraintExample
EXAMPLETITLE: 3-Roll Robotic Wrist Mechanism
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Models a 3-Roll robotic wrist mechanism based on the Cincinnati-Milacron 3-roll wrist mechanism. The mechanism uses three bevel gear pairs to rotate the tool about 3 independent axes. The tip of the tool moves along the surface of a sphere and can be rotated about an axis that passes through the center of that sphere (drilling action). In this example, precomputed torques are applied to the three drive shafts to achieve a certain trajectory (on the surface of the sphere) of the tool tip. Drilling is performed at different points along the trajectory.


COMPONENT: sm
EXAMPLENAME: DocCentrifugalGovernorExample
EXAMPLETITLE: Measure Inertial Properties of Multibody Systems
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Measure the inertial properties, such as mass and center of mass, of a group of bodies or an entire mechanism by using the Inertia Sensor block.


COMPONENT: sm
EXAMPLENAME: LandingGearExample
EXAMPLETITLE: Airplane Wing Landing Gear
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
A wing landing gear mechanism that can deploy and retract based on the input deploy signal. The mechanism consists of the main column that houses the wheel assembly and the locking mechanism that is used to lock the landing gear in the deployed position.


COMPONENT: sm
EXAMPLENAME: DocGravitationalFiledExample
EXAMPLETITLE: Model Gravity in a Planetary System
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Assemble a system of gravitationally-bound free bodies using Cartesian Joint and Gravitational Field blocks.


COMPONENT: sm
EXAMPLENAME: ConstantVelocityJointExample
EXAMPLETITLE: Modeling Constant Velocity Joints - Power Take-Off Shaft
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
A Power Take-Off (PTO) shaft, a device for transferring power from tractor engines to auxiliary equipment such as soil tillers and wood chippers. The model includes two PTO subsystems identical in every sense but their joints. One contains universal (U) joints, the other constant-velocity (CV) joints.


COMPONENT: sm
EXAMPLENAME: ImportedFourBarExample
EXAMPLETITLE: Four Bar Mechanism Imported from a CAD Assembly
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Has been imported from a CAD assembly designed in SolidWorks® using the smimport command. The XML file "FourBar.xml" and the STL files obtained during export of the CAD assembly have been used to create this example.


COMPONENT: sm
EXAMPLENAME: ModelingAndControlOfAMarsRoverExample
EXAMPLETITLE: Modeling and Control of a Mars Rover
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Models a mars rover performing a sample retrieval task using Simscape Multibody and Robotics System Toolbox. The rover follows a desired path on a rigid terrain surface, stops at the target location and uses its manipulator to pick and store a sample from the surface. It uses the following key features to model different aspects of the application:


COMPONENT: sm
EXAMPLENAME: DoubleWishboneExample
EXAMPLETITLE: Double Wishbone Suspension
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Illustrates a double wishbone front wheel automotive suspension. The suspension is mounted on two platforms that can independently move up and down to simulate a road profile on each wheel. For a given pair of road profiles, the resultant roll and bounce of the chassis can be studied and the suspension parameters tuned for optimal performance. The inputs to the two platforms are the road profile and its derivative. The platforms have a PD controller that controls the vertical position of the platform to mimic the input road profile. See "Road Profiles Generator" block dialog for details on the test road profiles.


COMPONENT: sm
EXAMPLENAME: Cartesian3DPrinterExample
EXAMPLETITLE: Cartesian 3-D Printer
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Models a Cartesian 3-D printer. The model allows you to specify the rotational motion of the motor on each axis to define a printing path. In this example, the printing head moves along the edges of two letters, S and M, using the predefined rotational motions.


COMPONENT: sm
EXAMPLENAME: BlockAndTackleExample
EXAMPLETITLE: Block and Tackle with Four Pulleys
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a block and tackle with four pulleys. Torque is applied to a winch which acts through the pulley mechanism to lift a load. Blocks from the Simscape™ Multibody™ Belts and Cables library are used to model the block and tackle.


COMPONENT: sm
EXAMPLENAME: RatchetLifterExample
EXAMPLETITLE: Ratchet Lifter
PRODUCT: MATLAB;Simscape Multibody
DESCRIPTION:
Models a ratchet lifter and demonstrates how to use contact proxies for contact problems that involve complex geometries.


COMPONENT: sm
EXAMPLENAME: SelfLockingWormAndGearConstraintExample
EXAMPLETITLE: Modeling Self-Locking Worm and Gear Constraints - Worm Jack
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a self-locking worm and gear constraint. The model shows a mechanical jack driven by a torque applied to a worm. The model includes two worm jack subsystems identical in every sense except for the value of the worm lead angle. Both subsystems have friction models applied to their Worm and Gear Constraint blocks.


COMPONENT: sm
EXAMPLENAME: RackAndPinionExample
EXAMPLETITLE: Using the Rack-Pinion Block - Windshield Wiper Mechanism
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
A windshield wiper mechanism. The mechanism utilizes a rack and pinion to drive the wiper blades in a synchronized fashion. The rack is actuated using a scotch yoke coupling (modeled using a pin-slot joint) that converts the rotary motion of the motor to reciprocating motion of the rack. The rack and pinion arrangement converts the reciprocating linear motion of the rack into reciprocating angular motion of the wiper blades (which are rigidly attached to the pinion).


COMPONENT: sm
EXAMPLENAME: SpaceManipulatorExample
EXAMPLETITLE: Cable Driven Space Manipulator
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Models a cable driven space manipulator. The manipulator comprises of 2 links connected via a system of revolute joints. Each link consists of belt-cable circuits which drive the movements of the manipulator. It also consists of a spring-damper system which provides different stiffness requirements. A space application is shown in this example where the objective of the manipulators is to capture a small satellite. The manipulators start from folded states and then perform necessary maneuvers to extend and reach the desired position. The pulleys are motion actuated from which necessary belt-cable kinematics are computed.


COMPONENT: sm
EXAMPLENAME: VariableModeJointRecirculationExample
EXAMPLETITLE: Variable Mode Joint Recirculation - Collision Course
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Simulates three balls with trajectories that restart when they reach the bottom of an obstacle course, allowing each of them to traverse the course multiple times per simulation.


COMPONENT: sm
EXAMPLENAME: ReducedOrderFlexibleSolidExample
EXAMPLETITLE: Using the Reduced Order Flexible Solid Block - Flexible Dipper Arm
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Model a flexible dipper arm, such as the arm for an excavator or a backhoe, by using the Reduced Order Flexible Solid block. This block captures the mechanical behavior of a deformable body through reduced-order stiffness and mass matrices that are associated with interface frame locations. In this example, the Partial Differential Equation Toolbox™ is used to create the reduced-order model.


COMPONENT: sm
EXAMPLENAME: ExternalCommonGearExample
EXAMPLETITLE: Using the Common Gear Block - Cardan Gear Mechanism
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
The Cardan Gear mechanism that converts rotational motion into reciprocating linear motion without using linkages or slideways. The mechanism uses three gears - one sun and two planet gears. The sun gear is twice as large as the planet gears (which are of the same size). The red pointer on the link traces a straight line as the gears rotate.


COMPONENT: sm
EXAMPLENAME: InvertedDoublePendulumExample
EXAMPLETITLE: Inverted Double Pendulum on a Sliding Cart
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Model an inverted double pendulum mounted on a sliding cart using Simscape™ Multibody™. It also illustrates the use of a controller to balance the pendulum in the upright position. Make any changes to the system and click on the blue box to generate a linearized model for the system before running the simulation. The control gains are computed using the linearized model. The pole placement technique is used to compute the control gains from the linearized model. The controller keeps the double pendulum vertical in the presence of a random disturbance force. See the supporting files linearize.m and controlGains.m for details.


COMPONENT: sm
EXAMPLENAME: VideoFlappingWingModelExample
EXAMPLETITLE: Create Video of Flapping Wing Model
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Create a video named FlappingWingVideo from the simulation results of the Using the Point-On-Curve Block Flapping Wing Mechanism example.


COMPONENT: sm
EXAMPLENAME: FourBarExample
EXAMPLETITLE: Assembling Parts into a Four Bar Mechanism
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Assemble instances of a modularly designed link into a four bar mechanism (crank-rocker type). The Crank and Rocker Links are copies of the same link, with different length, density and color parameters. The links are reused from the CompoundBody example. The Connector link is a slightly modified version of the same link. The four bar starts at an initial state and moves under the influence of gravity.


COMPONENT: sm
EXAMPLENAME: ImportedRobotArmExample
EXAMPLETITLE: Modeling a Robot Using STEP Files
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Import geometry and inertia data using STEP files. The STEP file is a standard format used commonly for data exchange between CAD applications. The format can capture the complete geometry information of a part. Given the mass of the part and the volume distribution, Simscape™ Multibody™ can automatically compute the inertia properties of the part. Open the Solid block dialogs in the above model to see how the geometry and inertia parameters are configured to utilize STEP files exported from another application (CAD for example). This method of importing geometry and inertia information can be used for CAD systems that are not supported by Simscape Multibody Link. A valid STEP file from any source application can be imported by this method.


COMPONENT: sm
EXAMPLENAME: SinglePendulumSimulinkComparisonExample
EXAMPLETITLE: Single Pendulum in Simulink and Simscape Multibody
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
A single pendulum modeled using Simulink® input/output blocks and using Simscape™ Multibody™. The initial angle for the joint is defined by a MATLAB® variable. The annotations on the integrator block show the initial angle of the joint with respect to the world frame.


COMPONENT: sm
EXAMPLENAME: InverseDynamicsExample
EXAMPLETITLE: Computing Actuator Torques Using Inverse Dynamics
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Illustrates the use of motion actuation to determine the actuator torques needed for the robot to achieve a given welding task. The system consists of a seven degree of freedom robot carrying a welding torch. The tip of the torch needs to trace the joints being welded. In this example the tip of the torch is made to trace (using motion actuation) a plus sign, a circle and a star sign on the workpiece. The torch is lifted off the workpiece when transitioning between the different shapes. The motion of the welding torch is specified and the actuator torques required at the various joints of the robot to achieve this motion is computed.


COMPONENT: sm
EXAMPLENAME: VariableModeJointContactExample
EXAMPLETITLE: Variable Mode Joint Contact - Drop and Catch Mechanism
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
A rotating arm that raises up a ball, drops the ball, and catches the ball in one cycle of rotation.


COMPONENT: sm
EXAMPLENAME: DoublePendulumSimulinkComparisonExample
EXAMPLETITLE: Double Pendulum in Simulink and Simscape Multibody
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Two models of a double pendulum, one using Simulink® input/output blocks and one using Simscape™ Multibody™.


COMPONENT: sm
EXAMPLENAME: DoublePendulumExample
EXAMPLETITLE: Assembling Parts into a Double Pendulum
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Assemble instances of a modularly designed link into a double pendulum. The Upper and Lower Links are copies of the same link, with different length, density and color parameters. The links are reused from the CompoundBodyExample example. The double pendulum starts at an initial state and moves under the influence of gravity.


COMPONENT: sm
EXAMPLENAME: QuadcopterExample
EXAMPLETITLE: Package Delivery Quadcopter
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Models a package delivery quadcopter. The quadcopter takes off from the launchpad and delivers the package to the drop-off location while following a desired trajectory.


COMPONENT: sm
EXAMPLENAME: ForkliftExample
EXAMPLETITLE: Forklift
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Models a forklift which uses the hydraulic and pulley mechanisms to perform the lift action. The tilting of masts is also controlled by hydraulic cylinders. The forklift comprises of 3 masts, namely main mast, top mast and fork mast. The main mast is connected to the chassis by revolute joints and its tilting is governed by the hydraulic tilt cylinders. The top mast slides over the main mast and its motion is governed by the hydraulic lift cylinders. The fork mast slides on the top mast and hangs through belt-cable circuits which drives the movement of the fork mast. A common warehouse application is shown in this example where the objective of the forklift is to grab a box, pass over a bump and place the box in the racks. Spatial Contact Force blocks are used at all contact locations to model the contact between the bodies. The contact between the ground surface and the wheels are modeled using infinite plane block and the contact between the forks and the box are modeled using the point blocks.


COMPONENT: sm
EXAMPLENAME: TowerCraneExample
EXAMPLETITLE: Tower Crane with Trolley and Hoist
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a tower crane with a trolley and a hoist. The hoist can raise and lower a load, and the trolley moves the load towards and away from the tower. Blocks from the belts and cables library are used to model the pulleys that control lifting the load and moving the trolley.


COMPONENT: sm
EXAMPLENAME: LeadScrewJointWithFrictionExample
EXAMPLETITLE: Lead Screw with Friction
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Models a lead screw with friction. The constraint force in the lead screw is measured and used to calculate the friction torque within the lead screw. A continuous stick-slip friction model is used to determine the coefficient of friction based on the relative rotational speed of the two parts connected by the lead screw.


COMPONENT: sm
EXAMPLENAME: LeadScrewJointExample
EXAMPLETITLE: Using the Lead Screw Joint Block - Linear Actuator
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Illustrates the use of the Lead Screw Joint block to model a linear actuator. The Lead Screw Joint block converts rotational motion at the Revolute Joint block to translational motion at the four Cylindrical Joint blocks. The translational motion is specified as a motion input to a cylindrical joint and the necessary actuator torque is automatically computed at the revolute joint.


COMPONENT: sm
EXAMPLENAME: InternalCommonGearExample
EXAMPLETITLE: Using the Common Gear Block
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Models a pair of gears with parallel axes. The assembly contains the two gears and all constraints required for the gear set. The assembly can be configured to model an external or internal gear set by adjusting parameters in the mask.


COMPONENT: sm
EXAMPLENAME: RightAngleDriveExample
EXAMPLETITLE: Pulley Mechanism Right Angle Drive
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
Models a pulley mechanism that takes a torque applied to a winch and transmits it to a pulley rotated at 90 degrees to that winch. This example uses blocks from the Simscape Multibody Belts and Cables library to model a pulley mechanism that is not all in a single plane.


COMPONENT: sm
EXAMPLENAME: DocPlanetaryGearExample
EXAMPLETITLE: Model a Compound Gear Train
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Use the Common Gear Constraint block to couple the rotational motions of the bodies comprising a planetary gear system.


COMPONENT: sm
EXAMPLENAME: StewartPlatformExample
EXAMPLETITLE: Stewart Platform
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
A Stewart platform manipulator that can track a parameterized reference trajectory. The shape, size, and kinematics of the manipulator are highly configurable.


COMPONENT: sm
EXAMPLENAME: SimpleBodyExample
EXAMPLETITLE: Creating a Simple Body
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
The first step in modeling a rigid body. This model is a simple body (brick) with a frame at each of two ends and a reference frame at the center of mass. The inertia for the body is specified as Geometric Inertia with a constant density. The block automatically computes the appropriate inertia components. This serves as a first approximation of the actual rigid body. In subsequent iterations more detail can be added to obtain a more accurate model of the actual rigid body.


COMPONENT: sm
EXAMPLENAME: CarouselExample
EXAMPLETITLE: Fairground Carousel Ride
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
A fairground carousel ride. A torque applied to the wheel causes the carousel to rotate and a hydraulic actuator provides the force to lift the arm. The cabs are free to rotate about an axis approximately tangential to the wheel radius. When the wheel is near vertical, the centrifugal acceleration acting on the cabs (caused by the rotation of the wheel) ensures that the cabs are close to a near vertical position. Consequently, the riders are close to 'up-side-down' at the top of the rotation.


COMPONENT: sm
EXAMPLENAME: CompositeForcesAndTorquesExample
EXAMPLETITLE: Sensing Composite Forces and Torques in Joints - Potter's Wheel
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
The example shows how you can sense forces and torques acting at joints. A potter's wheel spins with a piecewise linear velocity profile while holding a piece of clay off center. The clay creates a dynamic imbalance, generating periodic constraint forces at the joints. Viscous damping accounts for energy dissipation in the axle.


COMPONENT: sm
EXAMPLENAME: RunIKOnHumanoidRobotArmExample
EXAMPLETITLE: Run Inverse Kinematics on Humanoid Robot Arm
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Compute inverse kinematics for the right arm of a humanoid robot. Specifically, it computes the angles of the elbow and shoulder joints corresponding to a desired wrist position. Since this problem has multiple solutions, initial guesses for the shoulder joint angles are used to bias the solver towards a desirable solution.


COMPONENT: sm
EXAMPLENAME: WormAndGearConstraintExample
EXAMPLETITLE: Using the Worm and Gear Constraint Block - Solar Tracker
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Illustrates the use of the Worm and Gear Constraint block to model a solar tracker. A slew drive containing a worm and gear constraint powers the yaw rotation of the solar trackers. The worm and gear geometry gives a large reduction in a single stage of gearing which provides precision tracking and high torque output. The yaw rotation is specified as a motion input to the gear revolute joint and the necessary actuator torque is automatically computed at the worm revolute joint.


COMPONENT: sm
EXAMPLENAME: HydraulicInterfaceExample
EXAMPLETITLE: Hydraulic Interface - Dump Trailer with Hydraulic Cylinder
PRODUCT: MATLAB;Simscape Multibody;Simulink;Simscape
DESCRIPTION:
A dump trailer powered by a double-acting hydraulic cylinder. The cylinder actuates a scissor hoist mechanism that raises and lowers the dump bed. The model provides an example of how to interface Simscape™ Multibody™ joints with Simscape components that have mechanical domain ports.


COMPONENT: sm
EXAMPLENAME: RatchetPawlExample
EXAMPLETITLE: Ratchet Pawl Mechanism
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models a ratchet with a locking pawl. The arm pushes the driving pawl to rotate the ratchet wheel. The locking pawl holds the ratchet wheel in place while the arm reverses direction. Planar contact modeling geometry is used to streamline computation.


COMPONENT: sm
EXAMPLENAME: HowToBuildAMultibodyInSimulinkExample
EXAMPLETITLE: How to Build a Multibody in Simulink
PRODUCT: MATLAB;Simscape Multibody;Simscape;Simulink
DESCRIPTION:
Highlights key concepts and recommended steps for building a mechanical model using Simscape™ Multibody™. A simple design problem has been chosen to serve this purpose. The following section describes the design problem and subsequent sections discuss how to solve it.


COMPONENT: sm
EXAMPLENAME: ElevatorExample
EXAMPLETITLE: Elevator
PRODUCT: MATLAB;Simulink;Simscape;Simscape Multibody
DESCRIPTION:
Models an elevator system in Simscape™ Multibody™. The system is comprised of belt-cable pulley circuits which control the movement of the elevator and the door mechanism. The cable is approximated to be extensible by using high stiffness springs between the belt cable ends and the elevator. The motor pulley is motion actuated based on the necessary elevator kinematics computed from the Floor Number inputs. Effects of people entering and leaving the elevator are modeled using general variable mass blocks.


COMPONENT: soc
EXAMPLENAME: EventDrivenTaskExample
EXAMPLETITLE: Event-Driven Task
PRODUCT: MATLAB;SoC Blockset;Simulink
DESCRIPTION:
Use the task manager block to a simple system where data from UDP source gets processed asynchronously each time a data packet arrives. The task manager block


COMPONENT: soc
EXAMPLENAME: UsingTaskTimingInfoExample
EXAMPLETITLE: Determine and Use Task Timing Information
PRODUCT: SoC Blockset;Simulink;Embedded Coder
DESCRIPTION:
Choose an available method for determining timing information for the tasks on your processor. The Task Manager block uses task timing information to simulate task preemption, overruns, and parallel execution. The accuracy of task timing information provides confidence that the task simulation reflects the actual behavior on your processor.


COMPONENT: soc
EXAMPLENAME: EffectKernelLatencyOnTaskExecutionExample
EXAMPLETITLE: Effect Kernel Latency on Task Execution
PRODUCT: MATLAB;SoC Blockset;Simulink
DESCRIPTION:
The effect of kernel latency on the behavior and timing of two timer driven tasks in an SoC application.


COMPONENT: soc
EXAMPLENAME: TaskExecutionReportForSoCModelExample
EXAMPLETITLE: Performance Report for SoC Model
PRODUCT: MATLAB;SoC Blockset;Simulink
DESCRIPTION:
View the execution data for an SoC Blockset model using the Performance Report app. The task_execution_report_top_model model contains three timer-driven tasks that execute over two processor cores. Run the model.


COMPONENT: soc
EXAMPLENAME: UsingScheduleEditorInSoCApplicationsExample
EXAMPLETITLE: Scheduling Tasks in SoC Application Design
PRODUCT: MATLAB;SoC Blockset;Simulink
DESCRIPTION:
Schedule application tasks across multiple cores in an SoC Blockset model by using the Schedule Editor tool. Consider an application that has two periodic tasks:


COMPONENT: soc
EXAMPLENAME: SymmetricPWMWaveformExample
EXAMPLETITLE: Symmetric PWM Waveform
PRODUCT: MATLAB;SoC Blockset;C2000 Microcontroller Blockset
DESCRIPTION:
Generate a symmetric PWM waveform. In power switching circuits, such as the buck converter shown in this figure, symmetric PWM waveform signals can generate fewer harmonics in the output currents and voltages.


COMPONENT: soc
EXAMPLENAME: SchedulabilityAnalysisForMulticoreSoCApplicationsExample
EXAMPLETITLE: Scheduling Analysis for Multicore SoC Applications
PRODUCT: MATLAB;SoC Blockset;Simulink;System Composer
DESCRIPTION:
Maintain real-time rate-monotonic (RM) task scheduling by finding a mapping between application tasks and processor cores. To maintain real-time scheduling, each task must complete within the deadline defined by the period of the task.


COMPONENT: soc
EXAMPLENAME: BidirectionalInterprocessDataExchangeExample
EXAMPLETITLE: Two Way Interprocess Communication
PRODUCT: MATLAB;SoC Blockset
DESCRIPTION:
Two-way interprocess data communication between two processors running in an operating system managed processor.


COMPONENT: soc
EXAMPLENAME: TimerDrivenTaskExample
EXAMPLETITLE: Timer-Driven Task
PRODUCT: MATLAB;SoC Blockset;Simulink
DESCRIPTION:
Use the Task Manager block in a simple system where a timer-driven task samples and modifies data generated from a random number source.


COMPONENT: soc
EXAMPLENAME: MultiCoreTaskExecutionExample
EXAMPLETITLE: Multi-Core Task Execution
PRODUCT: MATLAB;Simulink;SoC Blockset
DESCRIPTION:
The simulation of multiple tasks, managed by the Task Manager block, execute on multiple cores with display the core activity shown in the Simulation Data Inspector.


COMPONENT: soc
EXAMPLENAME: PulseCenterMeasureEventFromPWMExample
EXAMPLETITLE: Pulse Center Measurement Event from Waveform
PRODUCT: MATLAB;SoC Blockset;C2000 Microcontroller Blockset
DESCRIPTION:
Generate an event for a task in the pulse center of a PWM waveform. You can use the triggering of an event in the pulse center of a PWM waveform to get correct current measurements from ADCs in switching power circuits, such as the buck converter circuit shown in this figure. The model in this example shows a basic ADC sampling from a PWM-driven switch.


COMPONENT: soc
EXAMPLENAME: SubSampledDataLoggingExample
EXAMPLETITLE: Subsampled Data Logging
PRODUCT: MATLAB;SoC Blockset;C2000 Microcontroller Blockset
DESCRIPTION:
Configure a resource intensive SoC Blockset model to log data from hardware when the model is deployed to a TI Delfino F28379D LaunchPad. The system contains two timer-driven tasks. The first task consists of a Sine Wave block connected to a Terminator block that represents a task running at a high rate. The second task uses a Rate Transition block to subsample and log the signals from the high-rate task.


