Question: ANSWER NEEDED IN THE NEXT HOUR PLEASE. SERIOUSLY. I need help doing the following problem using Matlab. Please include the actual code and put comments
ANSWER NEEDED IN THE NEXT HOUR PLEASE.
SERIOUSLY.
I need help doing the following problem using Matlab. Please include the actual code and put comments in to explain what you're doing. Thank you!
Write a function called mymax that will take a column vector of numbers as input and find the largest entry. The routine should spit out two numbers, the largest entry val and its position pos in the vector. Test the speed of your routine with the following commands: test=rand(1000000,1); tic; [val, pos]=mymax(test); toc. Compare the speed of your maximum routine with Matlabs tic; [pos, val] = max(test); toc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
