Hi all
I wish to calculate the measured response of a photodiode.
The photodiode has a gaussian instrument response function (IRF) while the input of the photodiode is a decaying exponential.
The IRF is defined as follows:
IRF = @(t) 1./(w*sqrt(2*pi)).*exp(-1/2*(t./w).^2);
where w is a numerical, known measured value.
The input decaying exponential signal is defined as follows:
decay_true = @(t) heaviside(t).*exp(-t/tau);
where tau is a numerical value.
The measured response at time t is the casual convolution of these two signals:
measured_signal = @(t) integral(@(tprime) IRF(tprime).*decay_true(t-tprime),tprime,-Inf,t)
I wish to pass this function a numerical array of "times" as follows
time = -1:0.001:1;
y = measured_signal(time);
plot(time,y);
However, MATLAB does not like variable integration limits, giving the error:
Error
A and B must be floating-point scalars.
Can anyone suggest how this integral can be computed with reasonable speed? I wish to pass this to a fitting algorithm later.
Thanks in advance!
Sincerely,
Ward Newman