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
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