source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/normcdf.m
@
177
Last change on this file since 177 was 37, checked in by , 15 years ago | |
---|---|
File size: 433 bytes |
Line | |
---|---|
1 | function p = normcdf(x,m,s) |
2 | %NORMCDF Normal Cumulative Density Function. |
3 | % P = NORMCDF(X) returns the probability that a standard normal variate will |
4 | % be less than X. |
5 | % |
6 | % P = NORMCDF(X,M,S) returns the probability that a normal variate with |
7 | % mean M and standard deviation S will be less than x. |
8 | |
9 | if nargin > 1 |
10 | if nargin == 3 |
11 | x = (x-m)./s; |
12 | else |
13 | error('Usage: normcdf(x,m,s)'); |
14 | end |
15 | end |
16 | |
17 | p = 0.5*erf(x/sqrt(2)) + 0.5; |
Note: See TracBrowser
for help on using the repository browser.