[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
index of max value of each column array
From: |
turbofib |
Subject: |
index of max value of each column array |
Date: |
Fri, 19 Oct 2018 18:49:58 -0500 (CDT) |
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..
>>a
4 5 6 7
2 3 4 4
6 7 8 5
9 5 6 4
max rows 1:3 is:
4 5 6==>6 =>index 3
2 3 1==>3 => index 2
6 7 8==>8=> index 3
9 5 6==>9==> index 1
answer is : 3 2 3 1
i try it :
[e,g]=find( a(1:3)==max(a(1:3,:)),3-1,"first")
but is not correct...i don't get the correct result
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- index of max value of each column array,
turbofib <=