<< Histogram Histogram distfun_histocreate >>

Distfun >> Distfun > Histogram > distfun_histocdf

distfun_histocdf

Histogram CDF

Calling Sequence

p=distfun_histocdf(x,h)
p=distfun_histocdf(x,h,lowertail)

Parameters

x :

a matrix of doubles, the outcome

h :

an histogram object

lowertail :

a 1-by-1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<=x) otherwise P(X>x).

p :

a matrix of doubles, the probability

Description

Computes the cumulated probability distribution function of the Histogram.

The h object must be created with distfun_histocreate.

Examples

m=1000;
data=distfun_normrnd(0,1,m,1);
h=distfun_histocreate("data",data);
x=linspace(-4,4);
y=distfun_histocdf(x,h);
scf();
plot(x,y,"r-")
ynorm=distfun_normcdf(x,0,1);
plot(x,ynorm,"b-")
legend(["Histogram","Exact"]);
xlabel("x")
ylabel("Probability")

Authors


Report an issue
<< Histogram Histogram distfun_histocreate >>