Uniform Discrete CDF
p = distfun_unidcdf ( x , N ) p = distfun_unidcdf ( x , N , lowertail )
a matrix of doubles, the outcome
a matrix of doubles, the upper bound (with N>=1)
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).
a matrix of doubles, the probability.
Computes the cumulated probability distribution function of the Uniform Discrete distribution function.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
The function definition is:
// Test expanded arguments c = distfun_unidcdf ( [1 2 3] , [4 5 6] ) e = [ 0. 0.25 0.4] // Plot the function N=5; scf(); x = 1:N; y = distfun_unidcdf(x , N); plot(x,y,"ro-"); h.children.data_bounds(:,2)=[0;1]; xtitle("Uniform Discrete CDF (N=5)","x","$P(X\leq x)$"); // See upper tail p = distfun_unidcdf ( 3, 7 ) q = distfun_unidcdf ( 3, 7 , %f ) p+q | ![]() | ![]() |