The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: uitable CellEditCallback question
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 1
Registered: 12/31/12
uitable CellEditCallback question
Posted: Dec 31, 2012 2:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


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!

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.