MATLAB: Replacing in categoricals or defining a default value

categoricalsMATLABreplaceundefined

I have a table with serveral columns one ot them contains categorical values called parttype. Initially the column ist empty resulting in <undefined> in every cell. After user input some of the cells might get filled. Which leads to the situation in the picture below:
Capture.PNG
I now want to compare the the new table with the old one to find the rows that have been changed. But since compareing <undefined> with each other will always say they are different this is not an option.
Therfore I wanted to replace all <undefined> values with a value like '-empty-' or make this the default value. But I can't figure it out.

Best Answer

YourTable.parttype = fillmissing(YourTable.parttype, 'constant', '-empty-');