Determine whether system is stable
B = isstable(sys)
B = isstable(sys,'elem')
B = isstable(sys) returns 1 (true) if the
dynamic system model
sys has stable dynamics, and
0 (false) otherwise. If
sys is a model array,
B is true only if all models in
B = isstable(sys,'elem') returns a logical
array of the same dimensions as the model array
The logical array indicates which models in
isstable is only supported for analytical
models with a finite number of poles.
Create an array of SISO transfer function models with poles varying from 2 to -2.
a = [-2:2]; sys = tf(zeros(1,1,1,length(a))); for j = 1:length(a) sys(1,1,1,j) = tf(1,[1 a(j)]); end
Examine the stability of the model array.
B_all = isstable(sys)
B_all = 0
isstable returns a single Boolean value that is 1 (
true) only if all models in the array are stable.
sys contains some models with nonpositive poles, which are not stable. Therefore,
isstable returns 0 (
Examine stability of each model in the array, element by element.
B_elem = isstable(sys,'elem')
B_elem = 0 0 0 1 1
'elem' flag causes
isstable to return an array of Boolean values, which indicate the stability of the corresponding entry in the model array. For example,
B_elem(4) = 1, which indicates that sys(1,1,1,4) is stable.