For loop problem; could you help?
Show older comments
I wish to calculate w to plot for (T,w) for every thi values and T values, my goal is to plot psychrometric chart
do I need to use double for loop on this case??
eg for thi = 0,1 , T = 0:1:60 , find w ;; for thi = 0,2 , T = 0:1:60 find w2 ..... ;;; for thi = 1 , t = T = 0:1:60 find w(n)
pg(i) has been successfully computed but struggling on finding w vectors.
Could you please take a look into this?
%%% welxer formulation
g0 = -2.9912729*1000;
g1 = -6.0170128*1000;
g2 = 1.887643854*10;
g3 = -2.8354721*10^-2;
g4 = 1.7838301*10^-5;
g5 = -8.4150417*10^-10;
g6 = 4.4412543*10^-13;
g7 = 2.858487;
% T ; %%%
%%%
T = 273.15:1:273.15+60 %%% temperature
thi = 0.1 : 0.1 : 1
for i = 1:length(T)
Pg(i) = exp((g0/T(i)^2 + g1/T(i) + g2 + g3*T(i) + g4* T(i)^2 + g5 *T(i)^3 + g6*T(i)^4 ) + g7*log(T(i)))/1000;
%%%%% I would like save w vectors for for every thi = 0:0.1:1 , T = 0:1:60
w(i) = (0.622*thi*Pg(i)/101-thi*Pg(i); %%%???
end
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



