function [T,coeff]=temp_antoine(x)
global coldata

P=1;%Pressure

%Antoine coefficients

A=2.8627;
B=-1145.091;
C=0;
init=[A,B,C];%Initial values
coeff=fsolve(@antoine_coeff,init,[],P);
A=coeff(1);
B=coeff(2);
C=coeff(3);

%Calculates the temp.profile

q=x*coldata.alfa';
pr=P./q;

T=B./(log10(pr)-A)+C;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function coeff=antoine_coeff(c,P)
global coldata

A=c(1);B=c(2);C=c(3);

c1=coldata.Tboil(1)-B/(log10(P/coldata.alfa(1))-A)+C;
c2=coldata.Tboil(2)-B/(log10(P/coldata.alfa(2))-A)+C;
c3=coldata.Tboil(3)-B/(log10(P/coldata.alfa(3))-A)+C;

coeff=[c1,c2,c3];