<< distfun_loguinv LogUniform distfun_logurnd >>

Distfun >> Distfun > LogUniform > distfun_logupdf

distfun_logupdf

LogUniform PDF

Calling Sequence

y = distfun_logupdf ( x , a , b )

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.

y:

a matrix of doubles, the density

Description

This function computes the LogUniform PDF.

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.

The LogUniform distribution with parameters a and b has density

if x in [exp(a),exp(b)].

Examples

y=distfun_logupdf(exp(4),3,5)

// Compare random numbers with PDF
a=2;
b=3.5;
N=10000;
x=linspace(exp(a),exp(b),1000);
y=distfun_logupdf(x,a,b);
r=distfun_logurnd(a,b,N,1);
scf();
histplot(20,r)
plot(x,y)
xtitle("Log-Uniform","X","");
legend(["Data","PDF"]);

Authors


Report an issue
<< distfun_loguinv LogUniform distfun_logurnd >>