Performing operations on rows/columns in matrix
Im using matrixctrl at 8×8 with toggle values ranging from 0-3. When a user increments a cell by clickin the toggle, i want to take the cell’s new clicked value and add it the values of each cell in its row and column. I also want to make sure that any cells with value 0 do not get any values added to them. (So that when a user changes one cell to value 1 when all other cells are 0, every cell in the row and column of the recently clicked cell wont all equal to 1)
I figured out a pretty complex way of doing this, but i was adding the value of the cell to the values of the 4 cells above, below, right and left of it. This gave me a list of 64 numbers ranging from 0-15. It worked nicely but I want to be able to have a higher range of possible numbers, and give stronger influence to individual cell values across the entire grid. It was also to0 complex as i was trying to time several different counter objects and zl objects to populate different tables of the grid data. I thought there must be an easier way.
Ive tried putting the matrixctl values all into a jit.cellblock and then selecting the rows and columns through a series of different counting methods…This seemed way seemed too complicated, as Im trying to grab the different elements of different lists at different times, and the selection modes of the jit.cellblock can be tricky since selecting a new selmode (ie, switching back and forth between row select and column select) will change the selection to 0 0 and output that value at first.
What I really need to know is,
- a more efficient way to perform comparisons of every element in a list without having to manually split them all up since ill be dealing with multiple lists of long lengths.
In the end I want every new cell value (after comparison) to be outputted into a jit.cellblock. This should be an interesting way of generating long sequences of widely varing numbers based on user input. It also looks pretty with my 4 colored buttons.
any ideas welcome…
ill tone down the complexity of this question by simply asking:
Is there a way to make comparisons on all elements in a list. For example, adding every element together, while not having to send each element to a different place in case your dealing with very long lists
relevent advice though…ill check into this