aboutsummaryrefslogtreecommitdiff
path: root/examples/mtx_binops.pd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mtx_binops.pd')
-rw-r--r--examples/mtx_binops.pd112
1 files changed, 112 insertions, 0 deletions
diff --git a/examples/mtx_binops.pd b/examples/mtx_binops.pd
new file mode 100644
index 0000000..9c700f4
--- /dev/null
+++ b/examples/mtx_binops.pd
@@ -0,0 +1,112 @@
+#N canvas 95 74 802 673 10;
+#X obj 87 360 mtx_mul;
+#X obj 157 360 mtx_*;
+#X obj 88 163 mtx_add;
+#X obj 167 166 mtx_+;
+#X obj 155 134 mtx_diag 1 2 3 4 5;
+#X obj 88 134 mtx_ones 5;
+#X obj 88 111 t b b;
+#X obj 88 185 mtx_print;
+#X msg 88 92 bang;
+#X text 142 165 ==;
+#X obj 305 134 mtx_eye 4;
+#X obj 305 159 mtx_add 10;
+#X msg 305 107 bang;
+#X obj 305 186 mtx_print;
+#X floatatom 374 101 4 0 0;
+#X obj 374 119 t b f;
+#X obj 392 160 mtx_+ 10;
+#X text 371 161 ==;
+#X obj 87 394 mtx_print;
+#X msg 87 270 bang;
+#X obj 133 332 mtx_diag 1 2;
+#X obj 87 297 t b b;
+#X obj 87 332 mtx_+ 3;
+#X text 137 361 ==;
+#X obj 87 314 mtx_eye 3 2;
+#X obj 249 399 mtx_print;
+#X obj 249 292 t b f;
+#X floatatom 249 274 4 0 0;
+#X msg 249 315 4 2 1 3;
+#X obj 249 335 mtx_diag;
+#X obj 249 363 mtx_mul 2;
+#X obj 328 363 mtx_* 2;
+#X obj 393 363 mtx_.* 2;
+#X text 310 363 ==;
+#X text 376 364 ==;
+#X obj 522 366 mtx_.*;
+#X obj 522 401 mtx_print;
+#X obj 522 304 mtx_diag 1 2 3;
+#X obj 553 322 mtx_ones 3;
+#X obj 522 283 t b b;
+#X msg 522 264 bang;
+#X obj 553 341 mtx_* 2;
+#X text 80 214 add 2 matrices;
+#X text 274 218 add an offset to a matrix;
+#X text 70 423 multiply 2 matrices;
+#X text 245 422 multiply a matrix with a scalar;
+#X text 506 425 multiply 2 matrices element by element;
+#X text 334 19 matrix arithmetic;
+#X obj 88 599 mtx_print;
+#X obj 88 492 t b f;
+#X floatatom 88 474 4 0 0;
+#X msg 88 515 4 2 1 3;
+#X obj 88 535 mtx_diag;
+#X obj 323 600 mtx_print;
+#X obj 323 503 mtx_diag 1 2 3;
+#X obj 354 521 mtx_ones 3;
+#X obj 354 540 mtx_* 2;
+#X text 84 622 divide a matrix by a scalar;
+#X obj 88 563 mtx_./ 2;
+#X obj 323 565 mtx_./;
+#X text 307 624 divide 2 matrices element by element;
+#X obj 323 482 t b b f;
+#X floatatom 323 463 4 0 0;
+#X obj 709 538 matrix;
+#X text 592 538 see also help for;
+#X connect 0 0 18 0;
+#X connect 2 0 7 0;
+#X connect 4 0 2 1;
+#X connect 5 0 2 0;
+#X connect 6 0 5 0;
+#X connect 6 1 4 0;
+#X connect 8 0 6 0;
+#X connect 10 0 11 0;
+#X connect 11 0 13 0;
+#X connect 12 0 10 0;
+#X connect 14 0 15 0;
+#X connect 15 0 10 0;
+#X connect 15 1 11 1;
+#X connect 19 0 21 0;
+#X connect 20 0 0 1;
+#X connect 21 0 24 0;
+#X connect 21 1 20 0;
+#X connect 22 0 0 0;
+#X connect 24 0 22 0;
+#X connect 26 0 28 0;
+#X connect 26 1 30 1;
+#X connect 27 0 26 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 25 0;
+#X connect 35 0 36 0;
+#X connect 37 0 35 0;
+#X connect 38 0 41 0;
+#X connect 39 0 37 0;
+#X connect 39 1 38 0;
+#X connect 40 0 39 0;
+#X connect 41 0 35 1;
+#X connect 49 0 51 0;
+#X connect 49 1 58 1;
+#X connect 50 0 49 0;
+#X connect 51 0 52 0;
+#X connect 52 0 58 0;
+#X connect 54 0 59 0;
+#X connect 55 0 56 0;
+#X connect 56 0 59 1;
+#X connect 58 0 48 0;
+#X connect 59 0 53 0;
+#X connect 61 0 54 0;
+#X connect 61 1 55 0;
+#X connect 61 2 56 1;
+#X connect 62 0 61 0;