function I = dischargeIntensity_JMS( beta, t )
% Current intensity during a condenser discharge in an LCR circuit
%   I(t) = Q0*w*sin(w*t))*exp(-t/tau)
% Input:
%   beta(1) : frequency w (rad/s)
%   beta(2) : decay time tau (s)
%   beta(3) : initial charge Q0 (C)
%   t(nt)   : time(s) in s
% Output:
%   I(nt)   : current at given times (A)
% J.M.Soler, Feb.2023

% Get circuit parameters
Q0  = beta(1);
w   = beta(2);
tau = beta(3);

% Find current
I = Q0*w*sin(w*t).*exp(-t/tau);

end
                