Forums > Jitter

matrix copy row or column

April 21, 2010 | 4:22 pm

Can anyone tell me if there’s an easy way in Jitter to take a list of 3 values and duplicate them across several rows or columns, i.e. take a 1 dimensional matrix with 3 values, eg [1 5 2] and create a 3×3 matrix of values [1 5 2, 1 5 2 , 1 5 2] and also create another 3.3 of: [1 1 1, 5 5 5, 2 2 2]

Apologies, I’m new to Jitter and imagine this is a very simple task, but I just can’t find it!!

Thanks!



Ad.
April 21, 2010 | 4:58 pm

here’s:

max v2;
#N vpatcher 0 44 1680 1046;
#P user jit.cellblock 848 787 1117 910 3 14 3 3 45 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 870 754 68 196617 jit.transpose;
#P user jit.cellblock 544 711 813 834 3 14 3 3 45 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#P newex 573 653 105 196617 jit.matrix 1 char 3 3;
#P number 770 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname [2];
#P message 713 386 117 196617 setcell 2 0 val $1 , bang;
#P number 656 300 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname
[1];
#P message 599 351 117 196617 setcell 1 0 val $1 , bang;
#P message 465 285 117 196617 setcell 0 0 val $1 , bang;
#P user jit.cellblock 478 452 747 575 3 14 3 1 45 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;
#P newex 507 394 105 196617 jit.matrix 1 char 3 1;
#P number 509 190 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname
;
#P connect 0 0 3 0;
#P connect 1 0 2 0;
#P connect 6 0 1 0;
#P connect 3 0 1 0;
#P connect 4 0 1 0;
#P connect 8 0 9 0;
#P connect 1 0 8 0;
#P connect 5 0 4 0;
#P connect 7 0 6 0;
#P connect 10 0 11 0;
#P connect 8 0 10 0;
#P pop;

Ad.


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