Query model order
NS = order(sys)
NS = order(sys) returns the model order NS. The order of a dynamic system model is the number of poles (for proper transfer functions) or the number of states (for state-space models). For improper transfer functions, the order is defined as the minimum number of states needed to build an equivalent state-space model (ignoring pole/zero cancellations).
order(sys) is an overloaded method that accepts SS, TF, and ZPK models. For LTI arrays, NS is an array of the same size listing the orders of each model in sys.
order does not attempt to find minimal realizations of MIMO systems. For example, consider this 2-by-2 MIMO system:
s=tf('s'); h = [1, 1/(s*(s+1)); 1/(s+2), 1/(s*(s+1)*(s+2))]; order(h) ans = 6
Although h has a 3rd order realization, order returns 6. Use
to find the minimal realization order.