资源描述:
《matlab2014-gui界面设计2》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、本文档黄色亮体字是本人自己输入的程序,其他的matlab模板部分,读者编程时可以不用管。如果读者在输入原程序时出错,可能是界面输出图片你没有,读者可以自己选择图片。以下是截面的样子。functionvarargout=Interface(varargin)gui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@Interface_OpeningFcn
2、,...'gui_OutputFcn',@Interface_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,v
3、arargin{:});endfunctionInterface_OpeningFcn(hObject,~,handles,varargin)I=imread('figure10.jpg');imshow(I);(显示界面图片handles.output=hObject;guidata(hObject,handles);functionvarargout=Interface_OutputFcn(~,eventdata,handles)varargout{1}=handles.output;functionp
4、ushbutton1_Callback(hObject,eventdata,handles)functionpushbutton2_Callback(~,eventdata,handles)a=str2double(get(handles.edit1,'string'));b=str2double(get(handles.edit2,'string'));c=str2double(get(handles.edit3,'string'));d=str2double(get(handles.edit4,'str
5、ing'));e=str2double(get(handles.edit5,'string'));f=str2double(get(handles.edit6,'string'));g=str2double(get(handles.edit7,'string'));h=str2double(get(handles.edit8,'string'));i=str2double(get(handles.edit9,'string'));j=str2double(get(handles.edit10,'string
6、'));k=str2double(get(handles.edit11,'string'));m=str2double(get(handles.edit12,'string'));n=str2double(get(handles.edit13,'string'));T0=288.15;P0=101325;T1=T0;P1=P0;Cp=[-0.06788e-90.1658e-60.06791e-30.9705];Ht=[6.8571e-51.0092-31.8714];P2=d*P1;T2=T1*(1+(d^
7、((1.4-1)/1.4)-1)/g);P3=h*P2;T3=1130;h2a=polyval(Ht,T2);h3a=polyval(Ht,T3);H3=2730.36;F=(h3a-h2a)/(i*42900-H3+h2a);DTt=1005*(T2-T1)/(1000*polyval(Cp,1130)*(1+F-k)*m);T4=T3-DTt;Pit=(1-DTt/(T3*j))^(-1.33/(1.33-1));P4=P3/Pit;P5=P4*n;Pib=P5/P0;Ma5=1;r=1;p5=P5*0
8、.5404;T5=T4;t5=T5*0.8464;V5=18.1*t5^0.5;A5=c*T5^0.5/(0.0397*P5);Fn=A5*P0*(1.2591*P5/P0-1);Fs=Fn/c;(主程序)sfc=3600*F*(1-k)/Fs;set(handles.edit14,'string',T0);set(handles.edit15,'string',P0);set(handles.edit16,'s