MATLAB: Adding to a uitable

uitable

I have read that you can add to a uitable by:
set(handles.uitable1,'data',s );
if I have a list of numbers I want to add to a row, not sure how to concatenate them to form the S in above code. Do they have to be delimited some way?
Thanks

Best Answer

"s" above needs to be a cell array, one entry per table cell.
If you were to append a list of numbers to an existing row, that would make the table wider, except that it would probably complain about the cell array not being rectangular.
What you might be asking about, perhaps, is replacing some empty entries with values: that would be done using cell operations such as
[s{5,11:15}] = deal(num2cell([31 9 214.4 -8]));
If you are asking about adding another row, then you would (e.g.)
[s;num2cell([31 9 214.4 -8])]