Shrink jit.matrix based on cell contents?


    Oct 21 2013 | 12:21 pm
    Hey,
    I'm looking for a way to shrink a jitter matrix based on cell contents. I have a very large matrix right now and I wold like to remove any cell that is equal to "0 0". That means that the matrix would go from being larger than 100 x 100 to a variable size that is based on the number of cells that contain a value. I'm obviously not interesting in maintaining cell position, but I'm only interested in a list of the data contained in the cells.
    Thanks for your help!

    • Oct 21 2013 | 3:33 pm
      On second thought, I just found the jit.spill object, which can only print out a pretty small list. Is there a way to restrict the matrix data before jit.spill so that jit.spill will only receive and output cells with a value != 0 ?
    • Oct 21 2013 | 9:05 pm
      This may work for you.
    • Oct 21 2013 | 9:17 pm
      If you want to get around the list length issue, you can use jit.iter
    • Oct 21 2013 | 11:41 pm
      Awesome! Great call on 'jit.iter', totally missed that. Thanks for the examples, this is exactly what I was looking for.