Info
This question is closed. Reopen it to edit or answer.
I want to display a matrix that I am getting from some calulations, in a uitable when I use the pushbutton in my GUI. How can I do it?? Here is the code for creating uitable & pushbutton and I want to set the value of uitable equal to matrix x & z?
2 views (last 30 days)
Show older comments
S.t = uitable('Position',... [c+220 412 220 120], 'Data', dat,... 'ColumnName', 'Values','ColumnWidth',{140},'ColumnEditable', true,... 'FontSize', 12, 'RowName',{'Face1','Face2','Face3','Ton/Km'});
S.btn5 = uicontrol('style','pushbutton','units','pixels',... 'position',[c a-70 170 50],'fontsize',14,'string','Calculate', ... 'Callback', 'x=linprog(f,A,b,Aeq,beq); z=abs(transpose(f)*x); disp(x);disp(z);');
0 Comments
Answers (1)
Image Analyst
on 12 Jul 2016
In the button callback have this:
set(S.t, 'data', z);
3 Comments
Image Analyst
on 13 Jul 2016
You're doing it the hard way - specifying all the properties and callbacks programmatically. Why not use GUIDE? Maybe you should try MAGIC: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component It has a grid control on there.
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!