Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

[Q] Mathematica, how to write a[[2,3]] having {2,3}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9233] [Q] Mathematica, how to write a[[2,3]] having {2,3}
  • From: eds at gravi.physik.uni-jena.de (E. Schmidt)
  • Date: Fri, 24 Oct 1997 01:00:48 -0400
  • Organization: Friedrich-Schiller-University Jena, Germany
  • Sender: owner-wri-mathgroup at wolfram.com

 Hallo World!

 The simple thing I want Mathematica to do is to read/write the element
 of the multidimensional array (List of List of...)
 with the indices are given in a List, e.g. 

In[]
 a={{11,12,13},{21,22,23,24,25}};
 ind12={1,2};
 NewValue=1000;
 SetElem[a,ind12,NewValue]
 a

Out[]
 
   {{11,1000,13},{21,22,23,24,25}} 

How to?


Thanks

Eduard

----------
For reading I use

In[]

  a[[ind12 /. {b___}->b]]

Out[]
  
  12


But it does not work for writing.
(A friend of mine says it works on Mathematica 3.0,
 but we still have Mathematica 2.2.3)

 What to do?


  • Prev by Date: Re: Log[Product[]] expansion to Sum[Log[]]?
  • Next by Date: Which version for symbolic calculation, student or full ?
  • Previous by thread: RE: Finding "start directory" with Mathematica 3.0 ?
  • Next by thread: Re: [Q] Mathematica, how to write a[[2,3]] having {2,3}