 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
TogaKangaroo Guest
|
Posted: Thu Jul 28, 2005 3:00 am Post subject: The equivalent of normalpdf()? |
|
|
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
|
Posted: Thu Jul 28, 2005 3:31 am Post subject: Re: The equivalent of normalpdf()? |
|
|
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
|
Posted: Thu Jul 28, 2005 3:48 am Post subject: Re: The equivalent of normalpdf()? |
|
|
* 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
|
Posted: Thu Jul 28, 2005 4:18 am Post subject: Re: The equivalent of normalpdf()? |
|
|
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
|
|
| Back to top |
|
 |
Alf P. Steinbach Guest
|
Posted: Thu Jul 28, 2005 4:28 am Post subject: Re: The equivalent of normalpdf()? |
|
|
* 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
|
Posted: Thu Jul 28, 2005 9:04 am Post subject: Re: The equivalent of normalpdf()? |
|
|
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
|
Posted: Thu Jul 28, 2005 9:34 am Post subject: Re: The equivalent of normalpdf()? |
|
|
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
|
Posted: Thu Jul 28, 2005 10:23 am Post subject: Re: The equivalent of normalpdf()? |
|
|
* 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 |
|
 |
|
|
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
|
|