Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

please helmp me for making a gui

1 view (last 30 days)
Chang Jae Kim
Chang Jae Kim on 13 Jul 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
this is my gui coding for pushbutton.
I want that the result of command 'if' is loaded to static text.
what should I do for that?Please help me.thank you.
load('CBM_DC.mat')
p1=str2double(get(handles.depth,'String'));
p2=str2double(get(handles.perm,'String'));
p3=str2double(get(handles.thick,'String'));
p4=str2double(get(handles.rank,'String'));
p5=str2double(get(handles.content,'String'));
p6=str2double(get(handles.strength,'String'));
p7=str2double(get(handles.extent,'String'));
p8=str2double(get(handles.dip,'String'));
p9=str2double(get(handles.num,'String'));
input=[p1 p2 p3 p4 p5 p6 p7 p8 p9];
[i1,is]=removeconstantrows(input);
[i2,is]=mapminmax(i1);
result=sim(net,i2');
fprintf('%8.1f \n',result);
if result<=-1
disp('Vertical, Openhole Cavity')
elseif result<=-0.6
disp('Vertical, Topset Under-ream')
elseif result<=-0.2
disp('Horizontal, Single Lateral')
elseif result<=0.2
disp('Horizontal, Multi Lateral')
elseif result<=0.6
disp('Vertical, Casedhole(Single Stage)')
elseif result<=1
disp('Vertical, Casedhole(Multi Stage)')
end
set(handles.technique,'String',result)

Answers (1)

Image Analyst
Image Analyst on 13 Jul 2013
if result<=-1
output ='Vertical, Openhole Cavity'
elseif result<=-0.6
output ='Vertical, Topset Under-ream'
elseif result<=-0.2
output ='Horizontal, Single Lateral'
elseif result<=0.2
output ='Horizontal, Multi Lateral'
elseif result<=0.6
output ='Vertical, Casedhole(Single Stage)'
elseif result<=1
output ='Vertical, Casedhole(Multi Stage)'
end
set(handles.yourStaticText,'String',output)
  2 Comments
Chang Jae Kim
Chang Jae Kim on 13 Jul 2013
thank you for your answer.
I have also one question.
in my script, I added the section point is limited two(ex) 0.5992->0.6) as followed
fprintf('%8.1f \n',result);
I want to get the result that the above the command is applied.
please help me one more. thank you.
Image Analyst
Image Analyst on 13 Jul 2013
I don't understand what you are saying. So you have that line. What's the problem?

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!