Question: I need help with writing a MATLAB function named HW 2 _ CountRand with proper comments to do the following: 1 ) Accept a positive
I need help with writing a MATLAB function named HWCountRand with proper comments to do the following:
Accept a positive integer n as input.
Generate a row array of n uniformly distributed random numbers between and They are not integers
Count how many of the n random numbers in the array are between and and assign it to variable n No loop should be used for obtaining n
Use a for loop to generate another n uniformly distributed random numbers between and During the iterations, you use a variable n to count how many are between and
Return n and n
Include function call instructions in the comments.
All statements in the function should suppress automatic output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
