<< fdist Distribution Functions gammadist >>

sci_gsl >> sci_gsl > Distribution Functions > flatuniform

flatuniform

Flat(Uniform) distribution

Syntax

y = flatuniform(a,b,x,c)

Parameters

y:

output

a, b:

'a' and 'b' are lower and upper limit respectively.

x:

x is a real number and lies in between 'a' and 'b' for cdf and pdf computation.

c = 1:

It will allow the user to generate a flat(uniform) random variate between the lower limit 'a' and the upper limit 'b'. In this case the function is independent of x and hence any value of x can be set.

c = 2:

It will allow the user to compute the probability density p(x) at x for flat(uniform) distribution with lower limit 'a' and upper limit 'b'.

c = 3:

It will allow the user to compute flat(uniform) cdf P(x).

c = 4:

It will allow the user to compute flat(uniform) cdf Q(x).

c = 5:

It will allow the user to compute inverse flat(uniform) cdf P(x).

c >=6:

It will allow the user to compute inverse flat(uniform) cdf Q(x).

Description

This function is used to calculate flat(uniform) random variate, probability density, cumulative distribution functions P(x), Q(x) and their inverse.

Examples

// probability density p(x) at x=1 for flat(uniform) distribution with parameter a=0.5 and b=2.5.
a=0.5
b=2.5
x=1
c=2
y = flatuniform(a,b,x,c)
disp(y)

Authors


Report an issue
<< fdist Distribution Functions gammadist >>