%% Choose model x = [0 3 6 9 12 15 18 21 24 27 30 33]; y = [50.6 46.8 43.2 40.0 37.0 34.2 31.6 29.2 27.0 25.0 23.1 21.4]; subplot(2,2,1) loglog(x,y) subplot(2,2,2) semilogy(x,y) subplot(2,2,3) semilogx(x,y) subplot(2,2,4) plot(x,1./y) %% Fit curve to data figure p = polyfit(x, log(y), 1); m=p(1); b=exp(p(2)); x1 = linspace(0,33); y1 = b*exp(m*x1); plot(x,y,'o',x1,y1,'-b')