%
%  Figure 6.14:  Missing Data Models
%
%  Bob Newell, March 1996
%------------------------------------------------------------
load flow.dat;
t = flow(1:2:286,1);
y = flow(1:2:286,2);
clear flow;
%
t(15:23) = [];
y(15:23) = [];
t(50:60) = [];
y(50:60) = [];
t(90:98) = [];
y(90:98) = [];
t(20:21) = [];
y(20:21) = [];
%
figure
plot( t, y, '+' )
set( gca, 'fontsize', 20 );
xlabel( 'Time in hours' );
ylabel( 'Flowrate' );
%
hold on
[ yn, tn ] = missing( y, t, 1, [ 2 2 4 ] );
plot( tn, yn )
[ yn, tn ] = missing( y, t, 2, [ 2 2 4 ] );
plot( tn, yn )
[ yn, tn ] = missing( y, t, 4, [ 6 6 4 ] );
plot( tn, yn )
hold off
%
print -f1 -deps2 ex6-11.eps
%

