Getting a specific value from a matrix
Hi,
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.
Thanks.
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.
I tried it but couldn't make it work. Probably I am doing something wrong.
Oh, nevermind. [jit.gen bool] seems to work.
Hi all!
I'm looking for a similar solution, but instead I need to create a new matrix filled only with the non-zero values. The new matrix should have different dimensions of the source matrix.
Any tips on how to achieve this without leaving the jitter world?