function f = DXDT_2Compartment_Exchange(~,x,V1,V2,PS)
% FUNCTION DXDT_AtoB_reaction(C)
% Inputs: ~ - placeholder
% x - vector of state variables
% x(1) = concentration in compartment A (mM)
% x(2) = concentration in compartment B (mM)
% V1 - Chamber 1 volume
% V2 - Chamber 2 volume
% PS - Exchange rate between two compartments
% Outputs: f - concentration time derivative
% {dA/dt, dB/dt}
A = x(1); % concentration of A
B = x(2); % concentration of B
dAdT = PS*(B-A)/V1;
dBdT = PS*(A-B)/V2;
f = [dAdT, dBdT]';