| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
P = unidcdf(X,N)
P = unidcdf(X,N) computes the discrete uniform cdf at each of the values in X using the corresponding maximum observable value in N. X and N can be vectors, matrices, or multidimensional arrays that have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs. The maximum observable values in N must be positive integers.
The discrete uniform cdf is
![]()
The result, p, is the probability that a single observation from the discrete uniform distribution with maximum N will be a positive integer less than or equal to x. The values x do not need to be integers.
What is the probability of drawing a number 20 or less from a hat with the numbers from 1 to 50 inside?
probability = unidcdf(20,50) probability = 0.4000
cdf, unidpdf, unidinv, unidstat, unidrnd, mle
Uniform Distribution (Discrete)
![]() | units property (dataset) | unidinv | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |