Cody

Problem 2927. Matlab Basics II - Max & Index of Max

Created by Yaz Majeed in Community

Write a function that takes a vector x, then returns both the max value in x and its location in the vector

for example

x = [1 4 5 2 3]

output: [5,3]

Solution Stats

42.81% Correct | 57.19% Incorrect
Last solution submitted on Jul 11, 2019