%
% Example 3.3: Simple Buffer Tank
%
% Bob Newell, March 1996
%
%-----------------------------------------------------------
%
function dxdt = Simple_Buffer_Tank( t, x )
global p
%
% x = [ 1=V 2=Ss ];
% y = [ 1=v_in 2=Ss_in 3=v_out 4=Ss_out  ];
% p = [ 1= ];
%
%-----------------------------------------------------------
  y = Simple_Buffer_Tank_Outputs( t, x );
  dxdt = zeros( 2, 1 );
%
  dxdt(1) = y(1) - y(3);
  dxdt(2) = ( y(1) * y(2) - y(3) * y(4) ) / x(1);
%-----------------------------------------------------------
% the end!   
