function a = inpath(varargin)
%  1.  NAME
%
%  inpath - Check the presence of a path in the Matlab path
%
%  2.  SYNOPSIS
%
%  a = indef(path, path, ...  )
%
%  3.  DESCRIPTION
%
%  This Matlab function takes a serie of path and checks if these are
%  present in the current Matlab path.
%
%  4.  PARAMETERS
%
%     path
%        A string containing the path to check for.
%
%  5.  RETURNS
%
%     a  An array with 1 if the corresponding path is present,0
%        otherwise.
%
%  6.  AUTHORS
%
%  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
%

a = [];

% Loop through the input arguments:
for i=1:nargin,
  
  if length(findstr(path, varargin{i})) > 0,
	 a(i) = 1;
  else
	 a(i) = 0;
  end
  
end

if nargin == 1,
  a = a(1);
end
   
