function [ ok ] = no_nans( varargin )
% no_nans:  this function returns the index for arrays elements that are
% not NaNs
%   This function takes an arbitrary number of arrays of the same lengths.
%   It tests those arrays for NaNs, and returns the index corresponding to
%   array elements that are non NaNs in any of the arrays.
%
% J. G. Bellingham, October 17, 2013
% MBARI

% Get arguments

for i = 1:nargin
    m(:, i) = varargin{i};
end

m = m';
not_ok = isnan(m);
not_ok = sum(not_ok);
ok = find(not_ok < 1);
