C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The equivalent of normalpdf()?

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
TogaKangaroo
Guest





PostPosted: Thu Jul 28, 2005 3:00 am    Post subject: The equivalent of normalpdf()? Reply with quote



A question I'm sure has come up before, but does anyone know how to
write/where to find the std for the equivalent of the normalpdf(X, mu,
sigma) function in matlab? For anyone who does not know what that is
it is the equivalent of finding the probability of X in a normal
distribution with mean mu and standard deviation sigma?

Back to top
Victor Bazarov
Guest





PostPosted: Thu Jul 28, 2005 3:31 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote



TogaKangaroo wrote:
Quote:
A question I'm sure has come up before, but does anyone know how to
write/where to find the std for the equivalent of the normalpdf(X, mu,
sigma) function in matlab?

If this question has come up before, you should be able to find the
answer[s] to it on Google Groups (http://groups.google.com/)

Quote:
For anyone who does not know what that is
it is the equivalent of finding the probability of X in a normal
distribution with mean mu and standard deviation sigma?

The Standard library doesn't have any probability functions. You
should try finding a suitable library on the Web. See the archives
on Google for the "Available C++ Libraries FAQ" posted here by Nikki
Locke about monthly. Follow the link in that post.

V



Back to top
Alf P. Steinbach
Guest





PostPosted: Thu Jul 28, 2005 3:48 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote



* Victor Bazarov:
Quote:
TogaKangaroo wrote:
A question I'm sure has come up before, but does anyone know how to
write/where to find the std for the equivalent of the normalpdf(X, mu,
sigma) function in matlab?

If this question has come up before, you should be able to find the
answer[s] to it on Google Groups (http://groups.google.com/)

For anyone who does not know what that is
it is the equivalent of finding the probability of X in a normal
distribution with mean mu and standard deviation sigma?

The Standard library doesn't have any probability functions. You
should try finding a suitable library on the Web. See the archives
on Google for the "Available C++ Libraries FAQ" posted here by Nikki
Locke about monthly. Follow the link in that post.

Or just Google for a definition of the function.

When I tried that the third Google hit gave a definition.

Now just translate that to C++, which should be trivial since all that's
needed is in the language and the standard library (header <cmath>), with
one exception: you'll have to compute pi, e.g. from arc cos, but this can be
done once at program startup.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Back to top
red floyd
Guest





PostPosted: Thu Jul 28, 2005 4:18 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

Alf P. Steinbach wrote:
Quote:
you'll have to compute pi, e.g. from arc cos, but this can be
done once at program startup.

Isn't M_PI included by reference from <math.h> via <cmath>?



Back to top
Jack Klein
Guest





PostPosted: Thu Jul 28, 2005 4:27 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

On Thu, 28 Jul 2005 04:18:12 GMT, red floyd <no.spam (AT) here (DOT) dude> wrote
in comp.lang.c++:

Quote:
Alf P. Steinbach wrote:
you'll have to compute pi, e.g. from arc cos, but this can be
done once at program startup.

Isn't M_PI included by reference from <math.h> via <cmath>?

There is no M_PI macro in either standard C or standard C++. An
implementation cannot define this symbol in a standard header if
invoked in strictly conforming mode.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html

Back to top
Alf P. Steinbach
Guest





PostPosted: Thu Jul 28, 2005 4:28 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

* red floyd:
Quote:
Alf P. Steinbach wrote:
you'll have to compute pi, e.g. from arc cos, but this can be
done once at program startup.

Isn't M_PI included by reference from <math.h> via <cmath>?

It isn't standard but often exists.

I don't any longer have an installation of the OP's compiler so can't check
that.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Back to top
TogaKangaroo
Guest





PostPosted: Thu Jul 28, 2005 9:04 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

I'm sorry, but that is incredibly unhelpful...I've been trying...what
did you search for to find pseudocode? A simple link would be real
nice if you found it. Yes, I see the thing from codecogs, but I don't
have an account there so it's really just taunting me...much like you
are.
Also, I certainly would try to find it in the forum but there's not
exactly a phrase to search for is it? "normpdf" and "normal pdf"
didn't give me anything, I'm lost after that.
I'm sorry for reposting uninteresting questions but I figure that the
veterans could easily redirect me and the subject could die off quickly.

Back to top
Free Bird
Guest





PostPosted: Thu Jul 28, 2005 9:34 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

TogaKangaroo wrote:

Quote:
Also, I certainly would try to find it in the forum but there's not
exactly a phrase to search for is it? "normpdf" and "normal pdf"
didn't give me anything, I'm lost after that.

Try normal probability distribution function.



Back to top
Alf P. Steinbach
Guest





PostPosted: Thu Jul 28, 2005 10:23 am    Post subject: Re: The equivalent of normalpdf()? Reply with quote

* TogaKangaroo:
Quote:
I'm sorry, but that is incredibly unhelpful...I've been trying...what
did you search for to find pseudocode?

"normalpdf"

Which gave a formula. Pseudocode is something else and irrelevant here.

That wasn't so incredibly hard, was it?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.