Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: integrating the symbolic normcdf
Replies: 5   Last Post: Jun 27, 2010 10:39 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Stafford

Posts: 5,868
Registered: 12/7/04
Re: integrating the symbolic normcdf
Posted: Jun 25, 2010 8:19 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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 old-fashioned 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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.