%
% Example 4.4: Different Weir Types
%
% Bob Newell, May 1996
%
%-------------------------------------------------------
%
font = 20;
global alpha
alpha = [ 20; 89.4427; 1788.9 ];
global beta
beta = [ 1; 1.5; 2.5 ];
%
xo = [ 0.05; 0.05; 0.05 ];
[ t, x ] = ode45( 'Weir_Tank', [0 30], xo );
%
[ n, m ] = size( x );
flow = zeros( n, m );
for i = 1:n,
  flow(i,:) = alpha' .* x(i,:) .^ (beta');
end;
plot( t, flow )
set( gca, 'fontsize', font );
axis( [ 0 30 1 2.2 ] )
sylabel( '\20Flow in m^3/min' )
xlabel( 'Time in minutes' )
%legend( 'Sutro', 'Rect', 'V-shape', -1 )
h = text( 4.4, 1.9, 'V-shaped' );
set( h, 'fontsize', font );
h = text( 4.7, 1.7, 'Rectangular' );
set( h, 'fontsize', font );
h = text( 5.0, 1.5, 'Sutro' );
set( h, 'fontsize', font );
%
disp( 'Final Heights above Weir:' );
x( n, : )
%
printsto -f1 -deps2 ex4-4.eps
%
%-------------------------------------------------------
% the end
