for i=1:1
ntu1=1/(u(3)*(Total_heat_exchanging_area_in_the_refrigent_side/nc))+Tube_thickness/(Pipe_heat_conductivity*(Total_heat_exchanging_area_in_the_refrigent_side/nc))+1/((u(2))*Fin_efficiency*(Total_heat_exchanging_area_in_the_air_side/nc));
ntu=1/(ntu1*Cmin);
Tai(i)=Inlet_air_temperature;
Tri(1)=Inlet_refrigent_temperature;
Cc=Cmin/Cmax;
yim=1-exp(ntu^0.22*(exp(-Cc*ntu^0.78)-1)/Cc);
qmax(i)=Cmin*( Tri(i)-Tai(i));
q(i)=yim*qmax(i);
Tro(i)=Tri(i)-q(i)/Crg;
Tao(i)=Tai(i)+q(i)/Cra;
Tri(i+1)=tro(i);
w(i)=Tro(i)-Refrigent_saturation_temperature_in_two_phase;
if w(i)<=0;
break
end
end
运行出现以下错误
An error occurred while running the simulation and the simulation was terminated
Caused by:
Error in 'Air_conditioning_system_with_sliding_mode_controller/S-Function' while executing MATLAB S-function 'Condensor_heat_transfer_calculation', flag = 3 (output), at time 0.0.
未定义与 'double' 类型的输入参数相对应的函数 'tro'。 该如何改程序呢? 谢谢大家