isprotected
Determine whether categories of categorical array are protected
Syntax
Description
tf = iSprotection(
returns logicalA
)1
(真的
) if the categories ofA
are protected. Otherwise,isprotected
returns logical0
(false
).
真的
— 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.