function P2_09A1 clear, clc, format short g, format compact xguess = 0.505 ; 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 fV = NLEfun(V); P = 100; R = .08206; T = 300; nmoles = 2.5 * 1000 / V; fV = P * V - (R * T);