Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Please Help

  • To: mathgroup at
  • Subject: [mg4093] Please Help
  • From: takuo at (Takuo Henmi)
  • Date: Tue, 4 Jun 1996 02:17:06 -0400
  • Organization: The University of Western Australia
  • Sender: owner-wri-mathgroup at

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 


  • Prev by Date: Re: help on critical points
  • Next by Date: Re: question
  • Previous by thread: Re: help on critical points
  • Next by thread: Re: question