[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?