Please Help
- To: mathgroup at smc.vnet.net
- Subject: [mg4093] Please Help
- From: takuo at psy.uwa.edu.au (Takuo Henmi)
- Date: Tue, 4 Jun 1996 02:17:06 -0400
- Organization: The University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
For those mathematica wizs, please help me. My question is how to find the max. value of its neighbors in a matrix, i.e. if you have a matrix 1 2 3 2 3 4 2 1 1 (it'll always be a square matrix) the max of the neighbors of cell [1,1] would be 3 (cell [2,2]), right? so new cell [1,1] will be 3. Like that, you'll have a new matrix, in this case, 3 4 4 3 4 4 3 4 4 (including the cell itself, e.g. cell [2,3]) and the boundaries are all 0s. Now I don't want to use like variable a[i,j], instead I wanna use a={{...},...,{...}} PLease help me if you would. Thanks in advance. Takuo Henmi ==== [MESSAGE SEPARATOR] ====