%
% Example 3.1: Constant Volume Tank
%
% Bob Newell, March 1996
%
%-----------------------------------------------------------
%
function y = Constant_Volume_Tank_Outputs( t, x )
global p
%
% x = [ 1=M ];
% y = [ 1=m_in 2=m_out ];
% p = [ 1= ];
%
%-----------------------------------------------------------
  [ n, m ] = size( x );
  y = zeros( n, 2 );
%
  for i = 1:n,
    % inflow rate
    if t(i) < 50,
      y(i,1) = 5;
    else,
      y(i,1) = 10;
    end; 
    % constant volume
    y(i,2) = y(i,1);
  end;
%-----------------------------------------------------------
% the end!   
