Method of mss.
Assert that the modelβs index vectors cover the tensor exactly.
Source: src/model/@mss/checkIndexDimensions.m
checkIndexDimensions(sys)
sys.checkIndexDimensions()checkIndexDimensions is the sanity check run at the end
of every mss construction
path. An mss describes its signals and equations by index
vectors rather than by fixed blocks, so nothing else guarantees that
those vectors and the tensor agree. The method asserts two
identities:
Where and come from depends on the tensor:
| Tensor | ||
|---|---|---|
CPNTensor |
rows of structureMatrixTrue |
rows of parameterMatrixOne |
TTTensor |
numel(cores) - 1 |
size(cores{1}, 2) |
Any other tensor class raises
"Unsupported tensor type.". A mismatch raises an assertion
naming both counts; the usual causes are a hand-written index vector
that does not match the matrices it indexes, or a state/output equation
split that leaves parameter rows unaccounted for.
The method returns nothing β it either passes silently or errors.
| Argument | Description |
|---|---|
sys |
The mss model to check. |
sys = rmss(3,1,1,4); % random 3-state, 1-input, 1-output model
sys.checkIndexDimensions(); % passes silentlymss Β· allSignalScalarIndices
Β· allEquationScalarIndices
Β· checkIndexDimensions
MyToolbox Documentation | Generated automatically by CI/CD pipeline