Info
此问题已关闭。 请重新打开它进行编辑或回答。
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?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Image Analyst
2016-7-12
In the button callback have this:
set(S.t, 'data', z);
3 个评论
Image Analyst
2016-7-13
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.
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!