| Contents | Index |
Test for undefined elements
I = isundefined(A)
I = isundefined(A) returns a logical array I the same size as the categorical array A. I is true (1) where the corresponding element of A is not assigned to any level. I is false (0) where the corresponding element of A is assigned to a level.
Create and display undefined levels in an ordinal array:
A = ordinal([1 2 3 2 1],{'lo','med','hi'})
A =
lo med hi med lo
A = droplevels(A,{'med','hi'})
Warning: OLDLEVELS contains categorical levels that
were present in A, caused some array elements to
have undefined levels.
A =
lo <undefined> <undefined> <undefined> lo
I = isundefined(A)
I =
0 1 1 1 0
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |