Question: USE MATLAB PLEASE Create a function that will take a positive integer as an argument. This function should do the followings when it is called
USE MATLAB PLEASE
Create a function that will take a positive integer as an argument. This function should do the followings when it is called by the user. 1) Generate n numbers of uniformly distributed random numbers between 0 and 1. The number n is equal to the value of your argument (YOU NEED TO USE rand() function) 2) Count how many numbers are =0.2 & 0.75. 3) Also, save numbers that fall into each category in variables A, B, and A: Set of numbers less 0.2 B: Set of numbers between 0.2 and 0.75 (0.2 and 0.75 included) C: Set numbers larger than 0.75 4) Calculate the sum of numbers in A, sum of numbers in B, and sum of numbers in C 5) Generate text files that will contain A, B, and C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
