%
% Example 5.1: Nonlinear DO - Air Relationship
%
% Bob Newell, March 1996
%-----------------------------------------------------------
global u
%
fontsz = 20;
figure
u = 1.08;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
axis( [ 0 1 2 4 ] )
set( gca, 'fontsize', fontsz );
xlabel( 'Time in days' );
ylabel( 'DO in mg/l' );
hold on
%
u = 0.98;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
u = 1.02;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
u = 0.96;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
u = 1.04;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
u = 0.92;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
h = text( 0.8, 3.22, '+2%' );
set( h, 'fontsize', fontsz );
h = text( 0.8, 3.35, '+4%' );
set( h, 'fontsize', fontsz );
h = text( 0.8, 3.62, '+8%' );
set( h, 'fontsize', fontsz );
h = text( 0.8, 2.92, '-2%' );
set( h, 'fontsize', fontsz );
h = text( 0.8, 2.76, '-4%' );
set( h, 'fontsize', fontsz );
h = text( 0.8, 2.43, '-8%' );
set( h, 'fontsize', fontsz );
%
hold off
%
figure
u = 1.2;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
set( gca, 'fontsize', fontsz );
xlabel( 'Time in days' );
ylabel( 'DO in mg/l' );
axis( [ 0 1 1 5 ] )
hold on
%
u = 0.8;
[ t, x ] = ode45( 'Nonlinear_DO_Air', [ 0 1 ], 3 );
plot( t, x )
%
hold off
%
print -f1 -deps2 ex5-1.eps
%

