0

I have a 200 by 100 matrix in matlab. I want to get the index of max of value in each row and store it in a vector 200 by 1?

can anybody please help me? I am new to matlab

Shelly
  • 817
  • 3
  • 11
  • 16
  • `A = max(M,[],2)` Where, `size(M) = 200*100`, and `size(A) = 200 * 1` – Devendra Lattu Apr 25 '17 at 20:29
  • @Devendra Lattu thanks, i have one big problem. i want to do majority voting on the acquired max values in matlab. I got the majority voting code from this link " "https://github.com/jsantarc/Majority-Vote-function-for-Matlab-/blob/master/majorityvote.m". I have put it in the same directory as other m files when i call the function [ out ] = majorityvote(max_index) it give me this error: Undefined function or variable 'majorityvote' – Shelly Apr 25 '17 at 21:05

0 Answers0