Question: Write code in MATLAB please 3. Run the command testvec rand (1000, 1); This will create a vector with 1000 randon numbers (between 0 and

 Write code in MATLAB please 3. Run the command testvec randWrite code in MATLAB please

3. Run the command testvec rand (1000, 1);" This will create a vector with 1000 randon numbers (between 0 and 1). Write a function that takes in this vector and returns the smallest element. You can use the built-in function min) to check your work, but don't call min) in your function. Now, run the command testMat rand (1000,1000);. This creates a 1000x1000 matrix full of random numbers. Write a function that takes in this matrix and returns the smallest element. 5. Write a function like in Exercise 4, but this time make it so it can find the smallest element in a matrix of any size. Hint: look up help on the built-in function size)

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!