Main Content

isuncertain

Check whether argument is uncertain class type

Synopsis

B = isuncertain(A)

Description

Returns true if input argument is uncertain, false otherwise. Uncertain classes are umat, ufrd, uss, ureal, ultidyn, umargin, ucomplex, ucomplexm, and udyn.

Examples

In this example, you verify the correct operation of isuncertain on double, ureal, ss, and uss objects.

isuncertain(rand(3,4)) 
ans = 
     0 
isuncertain(ureal('p',4)) 
ans = 
     1 
isuncertain(rss(4,3,2)) 
ans = 
     0 
isuncertain(rss(4,3,2)*[ureal('p1',4) 6;0 1]) 
ans = 
     1 

Limitations

isuncertain only checks the class of the input argument, and does not actually verify that the input argument is truly uncertain. Create a umat by lifting a constant (i.e., not-uncertain) matrix to the umat class.

A = umat([2 3;4 5;6 7]); 

Note that although A is in class umat, it is not actually uncertain. Nevertheless, based on class, the result of isuncertain(A) is true.

isuncertain(A) 
ans = 
     1 

The result of simplify(A) is a double, and hence not uncertain.

isuncertain(simplify(A)) 
ans = 
     0 

Version History

Introduced before R2006a