help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: index of max value of each column array


From: Andreas Weber
Subject: Re: index of max value of each column array
Date: Sat, 20 Oct 2018 11:49:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

Am 20.10.18 um 01:49 schrieb turbofib:
  a=[4 5 6 7;2 3 1 4;6 7 8 5;9 5 6 4]
i want to know index of max of each column between 1 and 3 rows..


[~, ii] = max (a(:,1:3), [], 2)
ii =

   3
   2
   3
   1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]