%    LBLMEDS - script to plot lbl navigation reply median errors
%
%    B. A. Moran, 21-May-1998

%    Copyright (C) 1995-1998, Massachussetts Institute of Technology
%    Sea Grant Autonomous Underwater Vehicles Laboratory
%    $Id: lblmeds.m,v 1.1 1998/07/01 13:31:47 bamoran Exp $	

if exist( 'h_meds' ) ~= 1
    h_meds = figure;
    winpos( [100+100*rand 100+50*rand 800 800] );
else
    h_meds = figure(h_meds);
end

set( h_meds, 'Name', 'LBL Median Error', 'DeleteFcn', 'clear h_meds' );
clrs = get( gca, 'ColorOrder' );

chv = [m_lbl_median1 m_lbl_median2 m_lbl_median3 m_lbl_median4];

ind = find( any(finite(data(:,chv))')' );

for ii = 1:length(chv)
    subplot( length(chv), 1, ii );
    plot( time(ind), data(ind,chv(ii)), 'o', 'color', clrs(ii,:) );

    ylabel( ['Ch ' num2str(ii)] );
end
