'Binornd using 1x8 arrays as N and P with 500 rows

I am trying to simulate a 500 day trial (500 rows) and need to run binornd using 1x8 arrays for both N and P but I do not seem to fully understand the parameters needed because I keep recieving a size information is inconsistent. N is the number of patients of a certain type and P is the probability that the patient of each type will schedule an appointment, running it once will give me the number of appointments in 1 day.

trials = binornd([332,360,324,270,144,40,20,5], [.006242,.010571,.014907,.019914,.025987,.029823,.03799,.041167], 500);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source