% function [ctd_depth] = ctd_depth_prep(time, depth, ctd_time)
%
% This routine computes depth in the CTD time-base.  
%
% J. G. Bellingham, MBARI
% August 26, 2000

function [ctd_depth] = ctd_depth_prep(time, depth, ctd_time);

ok = find(~((ctd_time < min(time)) | (ctd_time > max(time))));

ctd_depth = NaN * ctd_time;

ctd_depth(ok) = INTERP1(time, depth, ctd_time(ok));

return;