473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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?

Jul 28 '05 #1
8 3809
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.

V
Jul 28 '05 #2
* Victor Bazarov:
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?
Jul 28 '05 #3
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>?
Jul 28 '05 #4
* red floyd:
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?
Jul 28 '05 #5
On Thu, 28 Jul 2005 04:18:12 GMT, red floyd <no*****@here.dude> wrote
in comp.lang.c++:
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/~a...FAQ-acllc.html
Jul 28 '05 #6
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.

Jul 28 '05 #7
TogaKangaroo wrote:
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.
Jul 28 '05 #8
* TogaKangaroo:
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?
Jul 28 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
3
by: Robert Dodier | last post by:
Hello, Here's a thought that I'm sure has already occurred to someone else, I just can't find any record of it yet. An XML document is just a more verbose and clumsy representation of an...
1
by: Vannela | last post by:
Is there any equivalent control in .NET for the Power builder DataWindow control? I am explaining the Datawindow architecture to some extent. Power Builder DataWindow Control has got different...
6
by: Frank Rachel | last post by:
So I can focus on the correct areas of research, I was wondering if someone could give me the .NET equivelents for this J2EE architecture: JSP's make calls to local JavaBean Controls. The...
7
by: Tim Conner | last post by:
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s :...
10
by: karch | last post by:
How would this C# contruct be represented in C++/CLI? Or is it even possible? PolicyLevel level = (enumerator->Current) as PolicyLevel; Thanks, Karch
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.