% dzdtlag(ilag*2, isprd) = dzdt(valid(center));
% dpdtlag(ilag*2, isprd) = dpdt(valid(center));
% dpdzlag(ilag*2, isprd) = dpdt(valid(center))/dzdt(valid(center));
%
% J. G. Bellingham

curves = size(tlag);  % 1:10 is the entire bunch....
curves = 1:curves(2);

figure;
n = length(zlag);
plot(tlag(1:2:n, curves), dzdtlag(1:2:n, curves), '-x'); 
hold on;
plot(tlag(2:2:n, curves), dzdtlag(2:2:n, curves), '-o'); 
set( gca, 'YDir', 'rev' );
xlabel('Mission time (s)');
ylabel('Vertical speed (m/s)');
hold off;
zoom on

figure;
n = length(zlag);
plot(tlag(1:2:n, curves), dpdtlag(1:2:n, curves), '-x'); 
hold on;
plot(tlag(2:2:n, curves), dpdtlag(2:2:n, curves), '-o'); 
set( gca, 'YDir', 'rev' );
xlabel('Mission time (s)');
ylabel('Param time rate (param/s)');
hold off;
zoom on

figure;
n = length(zlag);
plot(tlag(1:2:n, curves), dpdzlag(1:2:n, curves), '-x'); 
hold on;
plot(tlag(2:2:n, curves), dpdzlag(2:2:n, curves), '-o'); 
set( gca, 'YDir', 'rev' );
xlabel('Mission time (s)');
ylabel('Param vert gradient (param/m)');
hold off;
zoom on
