<< LogUniform LogUniform distfun_loguinv >>

distfun >> distfun > LogUniform > distfun_logucdf

distfun_logucdf

LogUniform CDF

Calling Sequence

p = distfun_logucdf ( x , a , b )
p = distfun_logucdf ( x , a , b , lowertail )

Parameters

x:

a matrix of doubles

a:

a matrix of doubles, the minimum of the underlying uniform variable.

b:

a matrix of doubles, the maximum of the underlying uniform variable. b>a.

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

This function computes the LogUniform Cumulated Density Function.

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

Any optional input argument equal to the empty matrix will be set to its default value.

Examples

p=distfun_logucdf(exp(4),3,10)
pexpected = 0.4087797

a=2;
b=3.5;
N=10000;
x=linspace(exp(a),exp(b),1000);
y=distfun_logucdf(x,a,b);
r=distfun_logurnd(a,b,N,1);
r=gsort(r,"g","i");
scf();
plot(r,(1:N)./N,"r-");
plot(x,y,"b-")
xtitle("Log-Uniform","X","");
legend(["Data","CDF"]);

// Check upper tail
p=distfun_logucdf(exp(4),3,4,%f) // 0.8571429

Authors


Report an issue
<< LogUniform LogUniform distfun_loguinv >>