This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Generate random continuous test model




rss(n) generates an n-th order model with one input and one output and returns the model in the state-space object sys. The poles of sys are random and stable with the possible exception of poles at s = 0 (integrators).

rss(n,p) generates an nth order model with one input and p outputs, and rss(n,p,m) generates an n-th order model with m inputs and p outputs. The output sys is always a state-space model.

rss(n,p,m,s1,...,sn) generates an s1-by-...-by-sn array of n-th order state-space models with m inputs and p outputs.

Use tf, frd, or zpk to convert the state-space object sys to transfer function, frequency response, or zero-pole-gain form.


collapse all

Generate a random SISO state-space model with two states.

sys2 = rss(2)
sys2 =
  A = 
            x1       x2
   x1   -1.101   0.3733
   x2   0.3733  -0.9561
  B = 
   x1    0.7254
   x2  -0.06305
  C = 
           x1      x2
   y1       0  -0.205
  D = 
   y1  -0.1241
Continuous-time state-space model.

Generate a model with four states, three outputs, and two inputs. The input arguments to rss are arranged in the order states, outputs, inputs.

sys4 = rss(4,3,2)
sys4 =
  A = 
            x1       x2       x3       x4
   x1  -0.6722   -3.145   -4.692   -4.391
   x2    2.312  -0.3352    8.041    6.791
   x3    5.398    -7.51  -0.5229    1.114
   x4    4.087   -7.059  -0.3362  -0.4294
  B = 
            u1       u2
   x1        0  -0.2256
   x2    1.533        0
   x3  -0.7697        0
   x4        0  0.03256
  C = 
            x1       x2       x3       x4
   y1   0.5525  0.08593   -1.062   0.7481
   y2    1.101        0     2.35  -0.1924
   y3    1.544        0  -0.6156   0.8886
  D = 
            u1       u2
   y1        0   0.4882
   y2   -1.402        0
   y3        0  -0.1961
Continuous-time state-space model.

Generate a 4-by-5 array of SISO models with three states each.

sysarray = rss(3,1,1,4,5);
4x5 array of state-space models.
Each model has 1 outputs, 1 inputs, and 3 states.

See Also

| | |

Introduced before R2006a

Was this topic helpful?