isprotected
Determine whether a categorical array is protected.
📝Syntax
tf = isprotected(A)
📥Input Arguments
Parameter Description
A Input value.
📤Output Arguments
Parameter Description
tf Logical scalar that is true for protected categorical arrays.
📄Description

isprotected reports whether a categorical array prevents implicit category expansion during assignment.

Ordinal categorical arrays are protected automatically.

💡Examples
Create a protected categorical array and test it.
A = categorical({'low','high'}, {'low','high'}, 'Protected', true); tf = isprotected(A)
🔗See Also
categoricalisordinaladdcatssetcats
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub