[PD] list multiplication
Frank Barknecht
fbar at footils.org
Fri Feb 27 19:15:27 CET 2004
Hallo,
noskule hat gesagt: // noskule wrote:
> . .is there a object for mathematic basic operations on lists. . .?
> multiply(divide, add, substract) all elements of listA with listB . . .if
> possible the listlenght should be variable
>
> a1 a2 a3
> b1 b2 b3
>
> a1*b1, a2*b2, a3*b3,
Maybe there is a simpler way, but I would probably try to do this with
zexy's matrix objects. You can consider aX and bX as matrices with 1
dimension. Length is dynamic, but both vectors must match. See
attached example.
ciao
--
Frank Barknecht _ ______footils.org__
-------------- next part --------------
#N canvas 278 266 763 503 10;
#X obj 353 261 matrix 3 1;
#X obj 323 60 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 282 331 mtx_.*;
#X obj 220 256 matrix 3 1;
#X obj 282 354 mtx_print;
#X obj 323 82 t b b;
#X text 388 196 3-element vector containing values 5 \, 6 \, 7;
#X text 41 186 3-element vector containing values 1 \, 2 \, 3;
#X msg 220 223 matrix 3 1 1 2 3;
#X msg 353 223 matrix 3 1 5 6 7;
#X connect 0 0 2 1;
#X connect 1 0 5 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 5 0 8 0;
#X connect 5 1 9 0;
#X connect 8 0 3 0;
#X connect 9 0 0 0;
More information about the Pd-list
mailing list