Clone a list or matrix

Apr 11, 2011 at 4:55pm

Clone a list or matrix

Hi I’m trying to clone a matrix (or list) without useing the uzi object
For example I have this list:
0 0.25 0.5 0.75 1
and I want a list of 17 elements where the first list is repeated until the second is full
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1 0 0.25 …. and so on
maybe is possible with jit.expr?
jit.concat is not good because i have to clone more than two time.
Anyone can show me a good way without useing the uzi object?
Thanks so much.

Apr 11, 2011 at 5:20pm

Just found the Lrepeat object that repeat a list n times!
Very good but if you want repeat a list 2.5 time?
Because Lrepeat doesn’t accept float.
I continue to try…

Apr 11, 2011 at 5:32pm

There are lots of ways to do this, but here is one using jit.rota:

– Pasted Max Patch, click to expand. –
Apr 11, 2011 at 5:42pm

exactly what I was looking for.
Thank you very much!


You must be logged in to reply to this topic.