function [gf,ts]=fisher(m);
%    95% PERCENTILES FOR THE FISHER'S AND SIEGEL'S TEST OF PERIODICITY
% =======================================================================
% function [gf,ts]=fisher(m);
% INPUT:
% m ... vector of lengths of the periodogram, 5<=m(j)<=50
% OUTPUT:
% gf... gf(j)=Fisher's 95% percentile for m(j)
% ts... ts(j)=Siegel's 95% percentile for m(j)

% (C) 1997, V. Vesely, Masaryk University of Brno (Czech Republic)
%
error(nargchk(1,1,nargin));
if any(m<5), error('Periodogram must have length at least 5'); end
if any(m>50), error('The periodogram length must not exceed 50'); end
GF = [0.684, 0.274;
      0.445, 0.181;
      0.335, 0.140;
      0.270, 0.116;
      0.228, 0.0997;
      0.198, 0.0880;
      0.175, 0.0791;
      0.157, 0.0721;
      0.131, 0.0616];
mGF =[(5:5:40).';50];
gf=spline(mGF,GF(:,1),m);
if nargout>1
   ts=spline(mGF,GF(:,2),m);
end
