Beta cumulative distribution function
p = betacdf(x,a,b)
p = betacdf(x,a,b,'upper')
p = betacdf(x,a,b) returns the beta cdf at each of the values in x using the corresponding parameters in a and b. x, a, and b can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs. The parameters in a and b must all be positive, and the values in x must lie on the interval [0,1].
The beta cdf for a given value x and given pair of parameters a and b is
where B( · ) is the Beta function.