# Elements of a List according position in axis

  ({{a, b}, {c, d}})


a, b, c and d are Lists of 300 length. Their first 4 elements must specify their position in the column (1 column, 2 column, etc) and the following 4 elements the position in the line (1 line, 2 line, etc) but this must be made in binary code and not a 2x2 Table but a 10x10. Also, they must only contain -1, 0 or 1.

I was thinking about creating the vector with a smaller length and use AppendTo to put the position based on the table index and converting it to binary but couldn't find a final solution.

• That had something wrong in it. Sorry. Is it better to understand now? Or still confusing? – André F. Jun 18 '14 at 23:29
• Let me try and paraphrase this, tell me if I'm correct: You want a 10X10 matrix. Each entry is a 300 length vector, first 4 elements represent the second dimension position in binary, second 4 elements the first dimension, and the rest of the list is randomly (based on post before edits) selected elements from {-1,0,1}. Is that it? – ciao Jun 18 '14 at 23:43

result=Partition[Join @@@ Transpose[{Join @@@ Reverse /@ Tuples[IntegerDigits[Range@10, 2, 4], {2}],

• @AndréF.: Do you mean as an actual array? Just use result[[i,j]] or result[[i]][[j]] (note double brackets - that is correct array part specification syntax) – ciao Jun 19 '14 at 0:02