function S=expmod(x,p) % EXPMOD a m-function to calculate the semivariance using an exponential % model. This function is used in conjunction with NLLEASQR.M to % provide a non-linear least square fit to emprically derived % semivariance estimates (from the data). % % SYNTAX: % S=expmod(x,p) % % The parameter order is as follows: % p(1)=nugget % p(2)=sill % p(3)=range % % Started 1999:02:09 D. Glover, WHOI % Modif'd 1999:05:12 DMG to provide two forms of exponential model % Modif'd 1999:05:13 DMG to improve the "help" instructions % This is the "adjusted" sill form (used by Fuentes) S=p(1)+(p(2)-p(1))*(1-exp(-x./p(3))); % This is the more convential form %S=p(1)+p(2)*(1-exp(-x./p(3)));