Skip to content

isprotected

Test whether the categorical array’s category set is protected.

tf = isprotected(A)

Returns true if A was created with 'Protected', true (new categories cannot be added by assignment), false otherwise.

isprotected(categorical({'a','b'})) % 0
  • categorical — Create a categorical array from data.
  • isordinal — Test whether the categorical array is ordinal.