Clear Filters
Clear Filters

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)
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);');

Answers (1)

Image Analyst
Image Analyst on 12 Jul 2016
In the button callback have this:
set(S.t, 'data', z);
  3 Comments

This question is closed.

Products

Community Treasure Hunt

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

Start Hunting!