function S=sphermod(x,p) % SPHERMOD a m-function to calculate the semivariance using a spherical % 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=sphermod(x,p) % % The parameter order is as follows: % p(1)=nugget % p(2)=sill % p(3)=range % % Started 1999:05:12 D. Glover, WHOI % Modif'd 1999:05:13 DMG to improve the "help" instructions % Modif'd 1999:05:14 SCD correct "roll-over" and typos % Modif'd 1999:08:27 DMG & SCD correct S_far S_near=p(1)+(p(2)-p(1))*((1.5*x/p(3))-(0.5*(x/p(3)).^3)); S_far = p(2); S = S_near.*(x
=p(3));