Convert symbolic expressions toSimscapelanguage equations
simscapeEquation(f)
converts the symbolic expressionf
to a Simscape™ language equation. This function call converts any derivative with respect to the variablet
to the Simscape notationX.der
. HereX
is the time-dependent variable. In the resulting Simscape equation, the variabletime
replaces all instances of the variablet
except for derivatives with respect tot
.
simscapeEquation
converts expressions with the second and higher-order derivatives to a system of first-order equations, introducing new variables, such asx1
,x2
, and so on.
simscapeEquation(LHS,RHS)
returns a Simscape equationLHS == RHS
.
The equation section of a Simscape component file supports a limited number of functions. For details and the list of supported functions, see Simscapeequations
(Simscape). If a symbolic equation contains functions that are not available in the equation section of a Simscape component file,simscapeEquation
cannot convert these equations correctly to Simscape equations. Such expressions do not trigger an error message. Expressions with infinities are prone to invalid conversion.