MATLAB: Data analysis data if i have array x and i want to get the index of maximum value of it ex:x=[1 2 3 4 5 0 11] i want command which give me that index of max(x)->7 Best Answer Use the find function:indices = find(x == max(x));There might be more than one maximum, so your output might be a vector. If you want just one value, use this:index = find(x == max(x), 1); Related SolutionsMATLAB: How to find matrix indices Do you want the single biggest element in the matrix? If so then, just max() will not give you that. You'll get a row vector of the largest elements in each column. X = [1.2 1.3;1.8 1.5]; [val,idx] = max(X(:)); [I,J] = ind2sub(size(X),idx);X(I,J)is the largest element. MATLAB: Analysis No . There are no general ways (like inbuilt functions) to compare the performance of algorithms. Related QuestionReturn Indices for x Smallest/Largest Values in ArrayImage AnalysisI want to find in which row the minimum element isFind the non zero minimum and return the indexDATA ANALYSISHow can I get the min and corresponding max in matrix
Best Answer