Date: Dec 31, 2012 2:59 AM
Author: David
Subject: uitable CellEditCallback question

Hi, 

I am trying to create a uitable with 2 columns. First column is names, and second column is a logical column. Each name is associated with a time series. So when I check 2 names, I want Matlab to plot a graph of those 2 time series.

columnname = {'Assets', 'Compare'};
columnformat = {'char', 'logical',};
columneditable = [false true];
dat = (zeros(length(name),1))>1;
dat = num2cell(dat);
dat = [name dat];
t = uitable('Units','normalized','Position',...
[0.1 0.1 0.2 0.4], 'Data', dat,...
'ColumnName', columnname,...
'ColumnFormat', columnformat,...
'ColumnEditable', columneditable,...
'RowName',[],'tag','comptable','CellEditCallback', @AssetComp);

I am not sure how to plot the graph. I don't think I can plot in AssetComp function, because I don't know how to pass the time series data to AssetComp function.

If I just do the following, It doesn't realized that table data has changed.
Compdata = get(t,'data');
Compdata = cell2mat(Compdata(:,2));
IX = find(Compdata>0);

Any advise is appreciated, Thanks!