Info

此问题已关闭。 请重新打开它进行编辑或回答。

please helmp me for making a gui

1 次查看(过去 30 天)
Chang Jae Kim
Chang Jae Kim 2013-7-13
关闭: MATLAB Answer Bot 2021-8-20
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)

回答(1 个)

Image Analyst
Image Analyst 2013-7-13
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 个评论
Chang Jae Kim
Chang Jae Kim 2013-7-13
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 2013-7-13
I don't understand what you are saying. So you have that line. What's the problem?

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by