Mathematica Table item number

Find help with Math software, Engineering software, Graph software, Scientific software, Maple, Mathematica, Matlab, Pari/GP, calculators: Casio Classpad / TI Voyage / HP ...

Mathematica Table item number

I need to define some "Tables" in Mathematica, in which some elements contains their own item number, like the following example below (the letters are arbitrary numbers) :

A := {a, b, 3 c, d}
B := {1, b, c, 4}
C := {a, b, c, 4, d, 6}
D := {a, 2, c, d, 5, g}

How can I do this ? I'm looking for something like M := {a, b, c, ItemNumber, d, e, ...}. I can't put the number myself by hand, since the Tables are generated by another Mathematica code.

To be more precise (sorry for my bad English) :

What I'm looking for is a way to make Mathematica tell what is the position of a given element in a table. For some elements, I want the element-position in the table to be printed, in the table itself.

Say we have this Table :

A := {123, 215, 456, 786}

I need to change it to something ike this :

A := {123, 2, 456, 4}

The second and fourth elements were changed by their position-number in their table.
Cham
Newcomer

Posts: 23
Joined: Mon Mar 14, 2011 10:47 pm