Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

please helmp me for making a gui

1 vue (au cours des 30 derniers jours)
Chang Jae Kim
Chang Jae Kim le 13 Juil 2013
Clôturé : MATLAB Answer Bot le 20 Août 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)

Réponses (1)

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

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by