
Re: integrating the symbolic normcdf
Posted:
Jun 25, 2010 8:19 PM


"Angie" <angie11tr@yahoo.com> wrote in message <i03d7t$3tu$1@fred.mathworks.com>... > First: In the above post, I should have normcdf(x,0,1) not normcdf(x,1,0) > > Second: I tried this approach in another post, yet I am not sure if this is correct. Can anyone tell me if this is correct? > > fun1 = @(x) x; > fun2 = @(x) normcdf(x,0,1); > myintegrand = @(x) fun1(x).*fun2(x); > quad(myintegrand,0,1) > > ans = > 0.3710          Yes, that agrees with the answer I got using integration by parts with oldfashioned pen and paper, namely:
1/4 + 1/2/sqrt(2*pi*exp(1)) = 0.370985362
I would have thought the symbolic toolbox could also solve this.
Roger Stafford

