Convert a Simulink® model that is parameterized by unstructured workspace variables to a model that is parameterized by a MATLAB® structure. The example uses a number of Simulink utilities
This interactive example discretizes the Actuator Model in an aircraft Simulink® model.
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
What happens when a sine wave is fed into an If block. After running the simulation, the scope shows three plots. This example is designed to compare the If block with enabled subsystems.
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
The Prelookup block allows you to minimize the number of index searches performed across a set of look-up tables and also to mix clipping, extrapolation, and index search algorithms within
Use a dynamic comet plot to visualize the result of changing the interpolation and extrapolation options for a 2-D data set running in an-D Lookup Table block. Algorithm options can be
This model shows a potential use of the Find block. This block outputs a variable-size signal containing the indices of the nonzero values of the input.
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
This model shows how variable-size signals can be generated and also illustrates some of the operations that can be applied to them. The purpose of this example is to introduce you to the basic
Use the For Each Subsystem. In this example the operations are performed on a vector for simplicity.
Save memory in Prelookup and Interpolation blocks. The Prelookup and Interpolation Using Prelookup blocks allow the data type storing breakpoints and table data to be set explicitly. Note
This model shows a hypothetical system where the length of a signal changes over time by adapting to the changes of a control signal.
Use matrix and frame signals in Simulink® diagrams. Through this example, you can access models that relate to the following practical applications.
Model multiple objects with identical dynamics using the For Each Subsystem. The number of objects is parameterized by the length of the input signal.
This model shows how to use different operation modes to correspond to different signal sizes
What happens when a sine wave is fed into an enabled subsystem. After running the simulation, the scope shows three plots.
This model shows what happens when blocks are assigned different priorities. The block priority affects the order in which the blocks are executed. You can set the block priority through the
Use the For Each Subsystem. In this example the operations are performed on matrices.
How a filter can be applied to signals of different data types using standard Simulink® blocks. In this example, a signal with some noise on it is produced. This signal is then fed into a filter
This model shows triggered subsystems and describes the different trigger types. A triggered subsystem is executed for a single time step whenever the trigger port transitions from false
This model shows 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
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
What happens when a ramp signal is integrated using two resettable subsystems. After running the simulation, the scope shows three plots.
Take advantage of executing code on a multicore processor by graphical partitioning. This example requires Simulink Coder™ to generate multithreaded code.
Illustrates how to take advantage of executing multithreaded code on a multicore processor using graphical partitioning. This example requires Simulink® Coder™ to generate
To store multiple independent sets of values for the same block parameters, you can use an array of structures. To switch between the parameter sets, create a variable that acts as an index
Demonstrates how to implement a control algorithm containing multiple rates on Zynq. To take advantage of both the cores and the FPGA hardware, the example uses graphical partitioning
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.
Use the For Each Subsystem block to process submatrices data when neighboring submatrices overlap each other. To demonstrate this data processing approach, the example implements the
Use the Float Typecast block to extract the sign, exponent, and mantissa bits from a floating-point input, and then convert the bits back to a floating-point output after performing any
In this example, the model slexCounterFunctionMdlRef contains a Simulink Function update() which maintains a counter. Multiple instancing provides the ability to reuse this logic as
This model shows how to specify execution domains for the constituent subsystems of a model. The model has a discrete cruise controller subsystem that tracks the reference speed set in the
This examples shows a typical software modeling pattern involving services and access to those services in an application.
A common modeling pattern to dynamically schedule the execution of functions using a Stateflow chart.