Function Reference
— Function File: nbinrnd (n, p, r, c)
— Function File: nbinrnd (n, p, sz)

Return an r by c matrix of random samples from the Pascal (negative binomial) distribution with parameters n and p. Both n and p must be scalar or of size r by c.

If r and c are omitted, the size of the result matrix is the common size of n and p. Or if sz is a vector, create a matrix of size sz.