diag (Control Design and Simulation Module, MathScript Function)
Member of the connect class.
Syntax
SysDiag = diag(SysIn, n)
Description
Constructs a system model whose diagonal contains n copies of the SysIn model.
Inputs
Name | Description |
SysIn | Specifies a linear time-invariant (LTI) system model in transfer function, zero-pole-gain, or state-space form. |
n | Specifies the number of times to append the SysIn model to the diagonal. n is an integer. |
Outputs
Name | Description |
SysDiag | Returns a matrix whose diagonal contains n copies of the SysIn model. The remaining elements of this matrix are zeros. |
Examples
z_1 = 1;p_1 = 2;
z_2 = [];
p_2 = [1, 1];
K = [2; 1];
SysIn = zpk(z_1, z_2, p_1, p_2, K);
SysDiag= diag(SysIn, 3);