isprotected
Determine whether categories of categorical array are protected
Syntax
Description
tf = isprotected(
returns
logical A
)1
(true
) if the categories
of A
are protected. Otherwise, isprotected
returns
logical 0
(false
).
true
— When you assign new values toB
, the values must belong to one of the existing categories. Therefore, you only can combine arrays that have the same categories. To add new categories toB
, you must use theaddcats
function.false
— When you assign new values toB
, the categories update automatically. Therefore, you can combine (nonordinal) categorical arrays that have different categories. The categories can update to include the categories from both arrays.