Hi all,
Is there an efficient way to compute an integral within another integral as shown in the attached figure?
I am using the following code that is very slow, and I have to compute this function for a large number of input values.
pd_X = makedist('Normal',mu_X,sigma_X);pd_Y = makedist('Normal',mu_Y,sigma_Y);P = zeros(n,1); % set of probabilities for n input values
for i = 1:n f_Y = @(y) pdf(pd_Y,y); f_X = @(x) pdf(pd_X,x).*integral(f_Y,a*i-x,inf,'ArrayValued',true); P(i,1) = integral(f_X,-inf,(i-1)*a,'ArrayValued',true);end
Thanks in advance!
Best Answer