
%%
% Decay Curve Function by Daniel Natoli 
% (Adapted from a function supplied by Manor, E. & Martens, W. L.)  

% This function creates a two-dimensional curve to be used in conjunction
% with the distconv_script.m and distconv.m files. 
  
%%

function decay_curve = my_decay_function(decaytime, ~, decayfactor)

samples = decaytime;
initialvalue = 1; 
end_value = db2mag(decayfactor); 
decay_curve = zeros(decaytime,1);

    for t = 1:samples;
        decay_curve(t) = initialvalue*(end_value^(-t/samples));
    end
    
decay_curve = decay_curve - min(decay_curve);
end 