MATLAB: How to set values of specific data columns in a uitable

guiMATLABuicontroluitable

Hello, I have a gui table of 2 columns and 6 rows. how can I set to desired values, any specific column of my gui table?
i have tried to use : set(handles.traj_tableau,'data',newdata);
with newdata is a 6*1 column matrix, but this only lets me change the 1st columns of the table, I want to change the second one without changing the first one..
Please help this is urgent

Best Answer

You need to extract the entire set of data from the uitable, edit it, then set it back as the uitable's data.
tableData = get(handles.myTable,'data');
%manipulate the data here
set(handles.myTable,'data',tableData);