function T_i=TemperatureB(X)

% Boiling Temperature at 1 atm and 25°C 
% Tb_C2=184.5;     %	(-88.6 °C)
% Tb_C3=231.1;     %  (-42.09 °C)     
% Tb_iC4=261;      %  (-11.7 °C)
% Tb_nC4=272.6;    %  (-0.5 °C)
% Tb_C5=308;        %  (36.1 °C)
% Boiling Temperature at 3.67 bar
Tb_C2=212.30;
Tb_C3=264.97;
Tb_iC4=299.55;
Tb_nC4=311.92;
Tb_C5=345.43;
Tb_nC5=352.67;

%number of tray
NT=40;
% Number of component
NC=5;
% composition of NC-1
TC1_C4=X(1:NT)+X(NT+1:2*NT)+X(2*NT+1:3*NT)+X(3*NT+1:4*NT);
% composition of the heavy component
TC5=1-TC1_C4;
% Temperature at each tray
T_i =X(1:NT)*Tb_C2+X(NT+1:2*NT)*Tb_C3+X(2*NT+1:3*NT)*Tb_iC4+ X(3*NT+1:4*NT)*Tb_nC4 + TC5*Tb_C5;
% To compute the temperature at each tray and temperature profile of each
% component
%TT=[T_i X(1:NT)*Tb_C2 X(NT+1:2*NT)*Tb_C3 X(2*NT+1:3*NT)*Tb_iC4 X(3*NT+1:4*NT)*Tb_nC4 TC5*Tb_C5];