hello
there were only a few minor indexing issues in your main code.
also I recommend not using i or j as index var names as they are reserved for imaginary / complex numbers
so , here main code fixed :
C_c = 4.185*m4;
C_h = 4.185*m13;
Cmin = min(C_c, C_h);
Cmax = max(C_c, C_h);
Qmax = Cmin*(T13 - T4);
c = Cmin/Cmax;
A = [2.4; 4.3; 7.4; 4.3; 7.4; 9.1; 2.4; 4.3; 7.4;].*0.0929;
NTU = (2.5:0.1:3.5)';
for ci = 1:length(NTU)
eff(ci) = effectiveness(NTU(ci), c, 'One Shell Pass');
Q = (eff(ci).*Qmax);
U = (NTU(ci).*Cmin)./A.';
deltaTlm(ci,:) = Q./U.*A';
end
Best Answer