function [z dT1 dT2 dT3] = Tprof2(T0,T1,Th1,Th2,Th3,w1,...
    w2,wh1,wh2,wh3,UA1,UA2,UA3,iter)

size=1/iter;

z=(size:size:1)';

R1=(w1-wh1)/(w1*wh1);
R2=(w2-wh2)/(w2*wh2);
R3=(w1-wh3)/(w1*wh3);

dT1 = (Th1-T0)*exp(R1*UA1.*z);
dT2 = (Th2-T0)*exp(R2*UA2.*z);
dT3 = (Th3-T1)*exp(R3*UA3.*z);