MATLAB: Solve equation that includes integral with variable upper limit.

MATLABsolve equation

quadgk((1./(1000.*sqrt(2.*pi))).*(y-x-100).*exp(-((x-150).^2)./200),y-200,y-100)+quadgk((1./(10.*sqrt(2.*pi))).*(exp(-((x-150).^2)./200)),-inf,y-200)=0.53
How to solve the above equation? I want know the value of y.
I can not use fzero function. Please help me. Thanks!

Best Answer

FUN = @(Y)arrayfun(@(y)quadgk(@(x)(1./(1000.*sqrt(2.*pi))).*(y-x-100).*exp(-((x-150).^2)./200),y-200,y-100)+quadgk(@(x)(1./(10.*sqrt(2.*pi))).*(exp(-((x-150).^2)./200)),-inf,y-200),Y)
Now find the zeros of FUN - 0.53
Be careful, though: there gets to be a lot of numeric error beyond about 750.