| Mu Analysis and Synthesis Toolbox | ![]() |
Scale CONSTANT, SYSTEM and VARYING matrices
Syntax
Description
The mscl command scales the individual elements of a CONSTANT or VARYING matrix by the scalar fac. mscl produces a CONSTANT (VARYING) matrix, matout, given matin is a CONSTANT (VARYING) matrix, and fac is a scalar. When the output matrix, matout, is VARYING, it has the same independent variable values as matin, and is equal to matin multiplied by the scalar value fac. If matin is a SYSTEM matrix, then mscl produces a SYSTEM matrix, matout, in which the A and C matrices of matin are unchanged, and the B and D matrices have been scaled by fac. fac must be a scalar.
The command sclin scales the input channels to the matrix matin (which can be a CONSTANT, SYSTEM or VARYING matrix) defined by the variable inputs. inputs is a vector of integers, which selects the inputs channels (columns) to be scaled by fac. The command sclout performs the similar scaling on the outputs (or rows). fac can be a scalar, single-input/single-output (SISO) SYSTEM or a VARYING, 1 x 1, matrix. If matin and fac are both VARYING matrices, they must have the same independent variables to be used with sclin and sclout. The following options can be performed using sclin and sclout:
matin) matrix by a scalar or a SISO SYSTEM (fac).
matin), 1 x 1, matrix (fac).
Examples
mscl scales the three input, two output VARYING matrix, matin, by -2.5.
minfo(matin) varying- 2pts2 rows3 cols see(matin) 2 rows 3 columns indep variable0.2 3 13 23 4 14 24 indep variable0.3 4 14 24 5 15 25matout=mscl(matin,-2.5); see(matout) 2 rows 3 columns indep variable0.2 -7.5000 -32.5000 -57.5000 -10.0000-35.0000 -60.0000 indep variable 0.3 -10.0000-35.0000 -60.0000 -12.5000-37.5000 -62.5000
sclin command to scale the first input of a SYSTEM matrix by -3.
sys =pck(ones(3,3),2*ones(3,2),3*ones(1,3),4*ones(1,2)); seesys(sys) 1.0e+00 1.0e+00 1.0e+00 | 2.0e+00 2.0e+00 1.0e+00 1.0e+00 1.0e+00 | 2.0e+00 2.0e+00 1.0e+00 1.0e+00 1.0e+00 | 2.0e+00 2.0e+00 ------------------------------------------------------ 3.0e+00 3.0e+00 3.0e+00 | 4.0e+00 4.0e+00sysout=sclin(sys,1,-3); seesys(sysout) 1.0e+00 1.0e+00 1.0e+00 | -6.0e+00 2.0e+00 1.0e+00 1.0e+00 1.0e+00 | -6.0e+00 2.0e+00 1.0e+00 1.0e+00 1.0e+00 | -6.0e+00 2.0e+00 ------------------------------------------------------- 3.0e+00 3.0e+00 3.0e+00 | -1.2e+01 4.0e+00 Thescloutcommand can be used to scale the first and third outputs of a SYSTEM matrix by the first order transfer function 10/(s + 10). sys = sysrand(2,3,1); seesys(sys,'%11.2e) 2.19e-01 6.79e-01 | 9.35e-01 4.70e-02 6.79e-01 | 3.84e-01 ---------------------------------- 5.19e-01 5.35e-02 | 7.70e-03 8.31e-01 5.30e-01 | 3.83e-01 3.46e-02 6.71e-01 | 6.68e-02 sysout=sclout(sys,[1 3],nd2sys(10,[1 10])); seesys(sysout,'%11.2e') -1.00e+01 0.00e+00 -1.64e+00 -1.69e-01 | -2.43e-02 0.00e+00 -1.00e+01 -1.09e-01 -2.12e+00 | -2.11e-01 0.00e+00 0.00e+00 2.19e-01 6.79e-01 | 9.35e-01 0.00e+00 0.00e+00 4.70e-0 6.79e-01 | 3.84e-01 ---------------------------------------------|------------ -3.16e+00 0.00e+00 0.00e+00 0.00e+00 | 0.00e+00 0.00e+00 0.00e+00 8.31e-01 5.30e-01 | 3.83e-01 0.00e+00 -3.16e+00 0.00e+00 0.00e+00 | 0.00e+00 matin = vpck([ones(3,2);2*ones(3,2);3*ones(3,2)],[1;2;3]); seesys(matin) 3 rows 2 columns iv = 1 l.0e+00 l.0e+00 l.0e+00 1.0e+00 l.0e+00 l.0e+00 iv = 2 2.0e+00 2.0e+00 2.0e+00 2.0e+00 2.0e+00 2.0e+00 iv = 3 3.0e+00 3.0e+00 3.0e+00 3.0e+00 3.0e+00 3.0e+00 fac = vpck([1;2;3],[1;2;3]); sysout = sclout(matin,l,fac)i seesys(matin) 3 rows2 columns iv = 1 l.0e+00 l.0e+00 l.0e+00 l.0e+00 l.0e+00 l.0e+00 iv = 2 4.0e+00 4.0e+00 2.0e+00 2.0e+00 2.0e+00 2.0e+00 iv = 3 9.0e+00 9.0e+00 3.0e+00 3.0e+00 3.0e+00 3.0e+00
See Also
*, mmult, scliv, and sel
![]() | msf, msfbatch | mu, muunwrap, randel, unwrapd, unwrapp | ![]() |