cell value combinations in a matrix

    Mar 07 2006 | 12:32 pm
    Hello there,
    i don't know which topic covers my question, but it seems for me that this has something to do with matrix-calculations, so i thought the jitter-list might fit. If i have a matrix with dimensions 3x1 and each cell can contain a 0, 1 or 2, there are 27 (3^3) possible combinations. If you use the attached patch you get the example values printed to the max window. (index 1 - 0 0 0; index 27 - 2 2 2;)
    So each state has its own index. Is it possible to calculate the state of the cells by the index? It should be possible as each combination shows up only once. In the above example a 17 should result in "1 2 1". Unfortunately i need to calculate this with much more than 3^3 combinations. So i can't use a [coll] or similar to store all combinations. The only valuable thing that came to my mind is that after 3^1 combinations the second cell is affected and after 3^2 combinations the third cell. If there were more cells after 3^4 combinations the fourth cell would begin to change its content. But here i am stuck with my others ideas for days now. Please help me.
    Any hints are really much appreciated. Thanks a lot.

    • Mar 07 2006 | 4:04 pm
      Well. As it comes from time to time. I found a solution for this problem. If anybody is interested. The patch is at the end of the message.
      Thanks Tobias