Question: MATLAB Write a user-defined function named combo_time() that will can calculate the numbers of combinations possible for the following four counting methods: with replacement and
MATLAB

Write a user-defined function named combo_time() that will can calculate the numbers of combinations possible for the following four counting methods: with replacement and with order, without replacement with order, without replacement and without order, and with replacement and without order. The function will need to take in three input arguments: counting method as a string (valid values: 'w_w', 'wo_w', 'wo_wo', and 'w_wo'); n, the positive integer number of elements being sampled from; and k, the positive integer number of samples being taken. Check that that n> 0 and k>0 and, if both numbers are positive, round them with the function round() (this will allow the function to run if decimal values are entered by the user). If any user input is invalid, ask the user for new input. Note that for the methods without replacement, there is an additional condition that k 0 and k>0 and, if both numbers are positive, round them with the function round() (this will allow the function to run if decimal values are entered by the user). If any user input is invalid, ask the user for new input. Note that for the methods without replacement, there is an additional condition that k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
