Method of mss.
Evaluate the state equation at a given state and input.
Source: src/model/@mss/functionValue.m
f = functionValue(sys, stateVector, inputVector)
f = sys.functionValue(x, u)functionValue evaluates the multilinear
state equation of the model at the point
:
where
is the norm-1 monomial vector over the signal vector
and
is the state-equation block of the parameter matrix. What the result
means follows the model’s timeStepSize: it is the
state derivative
for a continuous-time model and the next state
for a discrete-time one. Only the state equation is evaluated — use outputValue for
.
Only the monomial columns the state block actually uses
(columnIndexStateEq) and the rows
stateEquationIndex are used, so the cost scales with the
state block, not with the whole tensor.
Two evaluation paths exist:
CPNTensor — the
unified value primitive computeFunctionValue,
which compiles the sliced tensor and evaluates it in the
MTISIM kernel.mtiTensor, e.g. TTTensor — the tensor’s
own computeFunctionValueMss.On the CPN path the signal vector is assembled by scattering
and
through stateIndex and inputIndex — exactly as
stateJacobian
and outputJacobian
do — so a permuted structure-matrix row layout is evaluated correctly.
For the natural [x; u] layout that rmss, ss2mss and the
connection routines produce, the scatter reproduces
[stateVector; inputVector].
| Argument | Description |
|---|---|
sys |
The mss model. |
stateVector |
State
at the evaluation point (sys.nState × 1). |
inputVector |
Input
at the evaluation point (sys.nInput × 1; [] if
the model has no inputs). |
| Output | Description |
|---|---|
functionValues |
sys.nState × 1 vector:
for a continuous model,
for a discrete one. |
sys = rmss(3,1,1,4);
xdot = sys.functionValue([1; 0; -1], 0.5);outputValue
· stateJacobian ·
msim · mss
MyToolbox Documentation | Generated automatically by CI/CD pipeline