Your data is numeric, not a cell array.
You already answered your own question when you wrote "I have a uitable with double values..:"
You originally created the UITABLE with numeric data, so its data will still be numeric when you access it later. It will not change into a cell array.
"I found the following on this site: "
That code applies to a UITABLE that was created using a cell array, so its data will still be a cell array when it is accessed later. It appears that you got that code from this thread, where data is clearly defined as a cell array:
There are two ways to control the format of numeric data shown in a UITABLE:
- Create the UITABLE using numeric data, setting the ColumnFormat option, which supports similar options as format does (long, short, bank, etc).
- Create a cell array of character vectors from the numeric data and use that cell array to create the UITABLE.
Only the second option lets you specify an arbitrary number of decimal digits and total control over the formatting.