MATLAB: Using uitable for mixed data

uitable

I have a table of mixed type: 'word', 1, 5, 9 [multiple rows]
I want to create a table using uitable and get the error: While setting the 'Data' property of 'Table': Data must be a numeric, logical, or cell array
How do I display mixed data?

Best Answer

data = {'word', 1, 5, 9; 'another', 7, 13, 21};
uitable('Data', data)
What would not be allowed is
data = {{'word', 1, 5, 9}; {'another', 7, 13, 21}}
That is, it is fine to use a cell array, but each entry inside the cell array must be a character vector or a numeric scalar or a logical (the new string data type is not supported either.). You are probably trying to use a cell array that has cell arrays in it.