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

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!