Question: 1) Write a function called generate_random_vector that will generate an array of random values that are from a uniform distribution (hint: inside it should use

 1) Write a function called generate_random_vector that will generate an array

1) Write a function called generate_random_vector that will generate an array of random values that are from a uniform distribution (hint: inside it should use the Matlab-provided rand function). It should take as inputs a scale that will scale the output and a count that will indicate how many samples to generate. The output should be a column vector of the appropriate length and magnitude.

2) Write a function called generate_random_vector_corrupted that is identical in every way to (1), except that every third element of the returned vector is zero. In your code, show how to do this both using a for loop and using Matlab vector indexing.

Write a function called generate_random vector that will generate an array of random values that are from a uniform distribution (hint: inside it should use the Matlab-provided rand function). It should take as inputs a scale that will scale the output and a count that will indicate how many samples to generate. The output should be a column vector of the appropriate length and magnitude. Write a function called generate_random vector_corrupted that is identical in every way to (1), except that every third element of the returned vector is zero. In your code, show how to do this both using a for loop and using Matlab vector indexing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!