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?

2 次查看(过去 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);');

回答(1 个)

Image Analyst
Image Analyst 2016-7-12
In the button callback have this:
set(S.t, 'data', z);
  3 个评论

此问题已关闭。

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by