以下是我matlab function里面的程序,用了for循环,其中Ln的计算中有log函数
function [t2,p2,x2,m2]= fcn(t1,p1,x1,m1)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%从进料端送风
%%输入参数
m0=55;G1=20000;a=96;L=26;b=1;p1=1.01;p2=1.01;m1=5.55;m2=5.55;
%%设定基础参数
n=24*60/(a+L);
v1=G1/(6.25*3600);
q00=(n*b)/60; %%时间步长/h
%%计算初始含湿量d,焓值h
Ln1=(-5800.2206/(273.15+t1))+1.3914993+(-0.04860239*(273.15+t1))+((0.41764768*(10^-4))*((273.15+t1)^2))+((-0.14452093*(10^-7))*((273.15+t1)^3))+6.5459673*log(complex(273.15+t1));
Pg1=exp(Ln1);
Pq1=x1*0.01*Pg1;
d1=622*Pq1/(94800-Pq1);
h1=1.01*t1+0.001*d1*(2500+1.84*t1);
Y1=(0.70427-0.00644*t1-0.23319*v1+0.00458*t1*v1+0.0000327688*t1*t1)*exp(-(-0.81522+0.03535*t1+0.35244*v1-0.003