function T_i=TemperatureS(X)

% Boiling Temperature
% 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)

Tb_C2=221.20;
Tb_C3=275.83;
Tb_iC4=311.84;
Tb_nC4=324.48;
Tb_C5=359.22;
Tb_nC5=366.61;


%number of tray
NT=92;
% 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];
