MATLAB: Uitable column with popupmenu format returns NaNs rather than selection

columnformatnanpopupmenuuitable

I'm working with a uitable and, for one column, I need to make a selection from a cell array of strings. However, whenever I make a selection, NaN is returned to the table instead of the chosen string.
The below code replicates the problem:
fmt = {'A' 'B' 'C' 'D'};
uitable('Data',cell(2,2),...
'ColumnEditable',true(1,2),...
'ColumnFormat',{fmt,'Numeric'})
Am I specifying the 'ColumnFormat' property incorrectly, or is something else going on?

Best Answer

Try this out:
fmt = {'A' 'B' 'C' 'D'};
uitable('Data',{'A';'A'},...
'ColumnEditable',true(1,2),...
'ColumnFormat',{fmt});