function g = pearson(x,pos,wid,m)
% pearson(x,pos,wid,m), pos=position; wid=half-width, m=shape number
% g = pearson(x,pos,wid,m) where x may be scalar, vector, or matrix
% pos = position; wid = width (both scalar)
% m = shape number.  When this number is 1.0, the shape is Lorentzian.
% When this number is large (>20), the shape approaches Gaussian. At
% small values (<1) the shape is a "cusp".
%  T. C. O'Haver, 1990
g=ones(size(x))./(1+((x-pos)./((0.5.^(2/m)).*4.62.*wid)).^2).^m;