Forums > Jitter

Getting a specific value from a matrix

Apr 26 2013 | 4:26 pm


I am trying to get all the 0 values from one matrix and write them to another matrix. I am sure there is an easy way to do this but I could not figure it out.


Apr 27 2013 | 5:04 pm

you could do something like [jt.expr @expr if in[0] == 0 then 0 else 1]
but you’ll have to htink what you want to fill teh rest of your matrix with (i assumed 1 here), cause you can’t create an incomplete matrix, you must fill all its cells at once.

Apr 28 2013 | 8:12 am

I tried it but couldn’t make it work. Probably I am doing something wrong.

-- Pasted Max Patch, click to expand. --

Apr 28 2013 | 9:12 am

Oh, nevermind. [jit.gen bool] seems to work.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Jitter