if size(cost,1) == 2 A = (4*Pdt*cost(1,3)*cost(2,3)) + 2*(cost(1,2)*cost(2,3))+(cost(1,3)*cost(2,2)); B = 2*(cost(2,3)+cost(1,3)); lambda = num2str(A ./ B); set(handles.answer1_staticText,'String', lambda); P1 = (lambda - cost(1,2))./(2*cost(1,3)); P2 = (lambda - cost(2,2))./(2*cost(2,3)); PT = mat2str(P1 + P2); set(handles.answer2_staticText,'String', PT); guidata(hObject, handles); end
From the coding above, the answer become like this :
[11.75 11.25 11.25 11.75 10.75 11.5 12.75 12.75 13]
My question is I want to display my answer at the static text box like this:
P1 = (%answer for P1) P2 = (%answer for P2) P TOTAL = (%answer for PT)
Can anyone help me with the coding?
You can build the multiline text, for example:
{['P1 =' string1],['P2 =' string2],['P3 =' string3]}
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.