Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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)
Write code in MATLAB please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started