search for: relmax

Displaying 1 result from an estimated 1 matches for "relmax".

Did you mean: relax
2008 Sep 21
1
Searching a relativ maximum of a matrix
...4 3 3 4 4 3 [5,] 3 4 4 3 3 3 2 2 [6,] 3 3 3 3 3 3 2 2 [7,] 2 2 2 2 2 4 2 1 [8,] 1 1 0 0 0 0 0 0 my first idea was to use this code: a <- matrix for (i in 2:7){ for (j in 2:7){ relmax <- a[a[i,j] > a[(i-1),(j-1)], a[(i-1),j], a[(i-1),(j+1)], a[i,(j-1)], a[i,(j+1)], a[(i+1),(j-1)], a[(i+1),j], a[(i+1),(j-1)]] } } but the code doesn't really work thanks. greets -- View this message in context: http://www.nabble.com/Searching-a-relativ-maximum-of-a-matrix-tp19590576...