source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/normcdf.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 433 bytes
Line 
1function 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
9if nargin > 1
10  if nargin == 3
11    x = (x-m)./s;
12  else
13    error('Usage: normcdf(x,m,s)');
14  end
15end
16
17p = 0.5*erf(x/sqrt(2)) + 0.5;
Note: See TracBrowser for help on using the repository browser.