MathGroup Archive 1996

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

Search the Archive

Part

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2890] Part
  • From: hans.steffani at e-technik.tu-chemnitz.de (Hans Steffani)
  • Date: Thu, 4 Jan 1996 10:31:10 -0500
  • Organization: University of Technology Chemnitz, FRG

w={{1,2,3},{4,5,6},{7,8,9}}
npos={2,1}

npos is the position of the element I need.

w[[npos]]

does not work, as it returns the second and the first
line.

w[[ npos[[1]],npos[[2]] ]]

does the wanted thing, but I would prefer a shorter and
more general way.

Hans Friedrich Steffani
--
Hans Friedrich Steffani
Institut fuer Elektrische Maschinen und Antriebe
TU Chemnitz-Zwickau
e-mail: hans.steffani at e-technik.tu-chemnitz.de

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: simulating a Poisson Forest
  • Next by Date: Question
  • Previous by thread: Re: Help, plot
  • Next by thread: Re: Part