Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 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] ====


  • 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