function P2_10A clear, clc, format short g, format compact xguess = 49.5 ; disp('Variable values at the initial estimate'); disp([' Unknown value ' num2str(xguess) ' Function Value ' num2str(NLEfun(xguess))]); xsolv=fzero(@NLEfun,xguess); disp(' Variable values at the solution'); disp([' Unknown value ' num2str(xsolv) ' Function Value ' num2str(NLEfun(xsolv))]); %- - - - - - - - - - - - - - - - - - - - - - function fTbp = NLEfun(Tbp); xA = .1; PA = 10 ^ (6.85221 - (1064.63 / (Tbp + 232))); PB = 10 ^ (6.87776 - (1171.53 / (224.366 + Tbp))); xB = 1 - xA; yA = xA * PA / 760; yB = xB * PB / 760; fTbp = xA * PA + xB * PB - 760;