The actual data is based on what the underlying data type of the UITable.Data property is. For example, if you create the table with data that is numeric, then the Data would be numeric. So when you try to add a string, it tries to put the string into the numeric Data -> NaN, then tries to print the numeric NaN as a 'char' which is NaN. The "NewData" is set to NaN because it is the underlying value that MATLAB wrote to the Data property array:
If you want to make sure that the table displays properly, the underlying Data types for the columns should match what you want to display.
Another workaround to this issue would be to add the following line of code in "UITableCellEdit" callback:
app.UITable.Data(event.Indices(1), event.Indices(2)) = {event.EditData}
This would convert the data to cell array and display it in the table as string.
Best Answer