|Program customized run-time errors and warnings|
|Return past value of operand|
|Return time derivative of operand|
|Define component equations|
|Reuse expressions in component equations and in member declarations of domains and components|
|Perform time integration of expression|
|Define intermediate terms for use in equations|
|Return value based on interpolating set of data points|
|Access global simulation time|
|Convert variable or parameter to unitless value with specified unit conversion|
The equation section of a Simscape™ file is executed throughout the simulation.
This example shows implementation for a simple algebraic system:
You can access global simulation time from the equation section
You can specify conditional equations by using
Textbooks often define certain equation terms in separate equations, and then substitute these intermediate equations into the main one.
You can use the
tablelookup function in the
section of the Simscape file to interpolate input values based on a set of data points in a one-dimensional, two-dimensional, or three-dimensional table.
assert construct to implement run-time error and warning messages for a custom block.
Use Simscape functions to reuse expressions in equations and member declarations of multiple components.
Example of using Symbolic Math Toolbox™ software to solve the physical equations, generate code in the format appropriate for the Simscape language equation section, and incorporate the generated code into the equation section of a component file.