gives the number of inputs and outputs of the systems model sys.
SystemsModelDimensions
gives the number of inputs and outputs of the systems model sys.
Details
- The systems model sys can be a TransferFunctionModel, StateSpaceModel, AffineStateSpaceModel, or NonlinearStateSpaceModel.
Examples
open all close allBasic Examples (4)
A TransferFunctionModel with three inputs and two outputs:
SystemsModelDimensions[TransferFunctionModel[{{{1, 1, 1}, {1, 1, 1}},
{{2 + s, 3 + s, 4 + s},
{3 + s, 4 + s, 5 + s}}}, s]]A StateSpaceModel with three inputs and two outputs:
SystemsModelDimensions[StateSpaceModel[{{{4, 1, 5, 1}, {0, 4, 3, 3}, {0, 2, 5, 0}, {1, 4, 2, 2}},
{{3, 5, 1}, {3, 4, 4}, {2, 2, 1}, {4, 3, 1}}, {{1, 1, 1, 5}, {0, 1, 4, 0}},
{{0, 0, 0}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]]An AffineStateSpaceModel with two inputs and one output:
SystemsModelDimensions[AffineStateSpaceModel[{{Subscript[a, 1][Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]],
Subscript[a, 2][Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3]], Subscript[a, 3][Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]]},
{{Subscript[b, 11][Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3]], Subscript[b, 12][Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]]},
{Subscript[b, 21][Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3]], Subscript[b, 22][Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]]},
{Subscript[b, 31][Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3]], Subscript[b, 32][Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]]}},
{Subscript[c, 1][Subscript[x, 1], Subscript[x, 2],
Subscript[x, 3]]}, {{0, 0}}}, {Subscript[x, 1],
Subscript[x, 2], Subscript[x, 3]}, Automatic, {Automatic}, Automatic,
SamplingPeriod -> None]]A NonlinearStateSpaceModel with two inputs and one output:
SystemsModelDimensions[NonlinearStateSpaceModel[{{f[x, Subscript[u, 1],
Subscript[u, 2]]}, {g[x]}}, {x},
{Subscript[u, 1], Subscript[u, 2]}, {Automatic}, Automatic,
SamplingPeriod -> None]]Applications (2)
Keep track of the number of inputs and outputs during model manipulations:
tfm = TransferFunctionModel[Table[(1/s + i + j), {i, 1, 5}, {j, 1, 7}], s]
SystemsModelDimensions[tfm]SystemsModelExtract[tfm, {2, 4, 5, 7}]
SystemsModelDimensions[%]SystemsModelDelete[tfm, {1, 3}, {4, 5}]
SystemsModelDimensions[%]Count the number of inputs and outputs while connecting models:
ssm1 = StateSpaceModel[{{{0, 0, 1, 0}, {0, 0, 0, 1}, {0, 0, -3, 0}, {0, 0, 0, -3}},
{{0, 0}, {0, 0}, {1, 0}, {0, 1}}, {{3, 0, 1, -3}, {2, 3, 1, 1}}, {{0, 1}, {0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ssm2 = StateSpaceModel[{{{0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 1},
{-30, 0, -17, 0, -13, 0, -3, 0}, {0, -30, 0, -17, 0, -13, 0, -3}},
{{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {1, 0}, {0, 1}}, {{6, -5, -5, 3, 0, 1, -1, 1}},
{{1, 1}}}, SamplingPeriod -> None, SystemsModelLabels -> None];
SystemsModelDimensions /@ {ssm1, ssm2}Connect the two outputs of ssm1 to the two inputs of ssm2:
SystemsModelSeriesConnect[ssm1, ssm2]The resulting system has two inputs and one output:
SystemsModelDimensions[%]Merge the first input of ssm1 and the second input of ssm2:
SystemsModelParallelConnect[ssm1, ssm2, {{1, 2}}, {}]The resulting system has three inputs and three outputs:
SystemsModelDimensions[%]Related Guides
Text
Wolfram Research (2010), SystemsModelDimensions, Wolfram Language function, https://reference.wolfram.com/language/ref/SystemsModelDimensions.html (updated 2014).
CMS
Wolfram Language. 2010. "SystemsModelDimensions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/SystemsModelDimensions.html.
APA
Wolfram Language. (2010). SystemsModelDimensions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemsModelDimensions.html
BibTeX
@misc{reference.wolfram_2026_systemsmodeldimensions, author="Wolfram Research", title="{SystemsModelDimensions}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SystemsModelDimensions.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_systemsmodeldimensions, organization={Wolfram Research}, title={SystemsModelDimensions}, year={2014}, url={https://reference.wolfram.com/language/ref/SystemsModelDimensions.html}, note=[Accessed: 13-June-2026]}