aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abs/mtx_polyval.pd74
-rw-r--r--abs/mtx_roots-help.pd15
-rw-r--r--abs/mtx_roots.pd56
3 files changed, 145 insertions, 0 deletions
diff --git a/abs/mtx_polyval.pd b/abs/mtx_polyval.pd
new file mode 100644
index 0000000..d63045d
--- /dev/null
+++ b/abs/mtx_polyval.pd
@@ -0,0 +1,74 @@
+#N canvas 96 236 810 668 10;
+#X obj 50 32 inlet;
+#X obj 310 34 inlet;
+#X text 354 32 coeffs;
+#X text 94 32 values;
+#X obj 50 60 mtx_:;
+#X obj 310 64 t a a;
+#X obj 342 86 mtx_size;
+#X msg 123 52 matrix 1 2 1 2;
+#X obj 273 547 mtx;
+#X obj 82 112 mtx_size;
+#X obj 272 245 pack f 4;
+#X obj 53 358 mtx;
+#X obj 53 379 mtx_.*;
+#X obj 103 379 t a;
+#X msg 92 316 1 \$1;
+#X obj 92 337 mtx_ones;
+#X obj 53 231 until;
+#X obj 53 273 f;
+#X obj 82 273 + 1;
+#X obj 115 437 list split 3;
+#X obj 155 459 list prepend;
+#X msg 236 437 row \$1;
+#X obj 155 480 list trim;
+#X msg 272 268 size \$1 \$2;
+#X obj 92 357 t a a b;
+#X msg 148 357 1;
+#X obj 53 293 t b f;
+#X msg 71 252 2;
+#X obj 53 210 t f b;
+#X obj 53 188 - 1;
+#X obj 53 169 f 2;
+#X obj 50 86 t b a;
+#X obj 286 588 mtx_print;
+#X connect 0 0 4 0;
+#X connect 1 0 5 0;
+#X connect 4 0 31 0;
+#X connect 5 1 6 0;
+#X connect 6 1 10 1;
+#X connect 6 1 30 1;
+#X connect 7 0 4 0;
+#X connect 8 0 32 0;
+#X connect 9 1 10 0;
+#X connect 9 1 14 0;
+#X connect 10 0 23 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 12 1;
+#X connect 13 0 19 0;
+#X connect 14 0 15 0;
+#X connect 15 0 24 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 17 0 26 0;
+#X connect 18 0 17 1;
+#X connect 19 1 20 0;
+#X connect 20 0 22 0;
+#X connect 21 0 20 1;
+#X connect 22 0 8 0;
+#X connect 23 0 8 0;
+#X connect 24 0 12 1;
+#X connect 24 1 19 0;
+#X connect 24 2 25 0;
+#X connect 25 0 21 0;
+#X connect 26 0 11 0;
+#X connect 26 1 21 0;
+#X connect 27 0 17 1;
+#X connect 28 0 16 0;
+#X connect 28 1 27 0;
+#X connect 29 0 28 0;
+#X connect 30 0 29 0;
+#X connect 31 0 29 0;
+#X connect 31 1 9 0;
+#X connect 31 1 11 1;
diff --git a/abs/mtx_roots-help.pd b/abs/mtx_roots-help.pd
new file mode 100644
index 0000000..2cb9dd9
--- /dev/null
+++ b/abs/mtx_roots-help.pd
@@ -0,0 +1,15 @@
+#N canvas 774 102 578 400 10;
+#X obj 100 212 mtx_roots;
+#X text 29 22 [mtx_roots] uses [mtx_eig] to solve polynomials (see
+MATLAB-help for 'roots');
+#X text 73 60 [mtx_eig] requires iemmatrix to be compiled with gsl
+;
+#X text 339 350 Franz Zotter \, 2010;
+#X text 60 127 (x-3i)(x+3i)(x-1)(x+2)(x-3)=;
+#X text 77 144 x^5-2x^4+4x^3-12x^2-45x+54;
+#X msg 100 185 1 -2 4 -12 -45 54;
+#X obj 82 268 print re;
+#X obj 160 267 print im;
+#X connect 0 0 7 0;
+#X connect 0 1 8 0;
+#X connect 6 0 0 0;
diff --git a/abs/mtx_roots.pd b/abs/mtx_roots.pd
new file mode 100644
index 0000000..2b3f2fa
--- /dev/null
+++ b/abs/mtx_roots.pd
@@ -0,0 +1,56 @@
+#N canvas 0 0 586 346 10;
+#N canvas 296 357 512 426 companion_matrix 0;
+#X obj 28 236 mtx_eye;
+#X obj -109 219 mtx;
+#X obj 179 87 list length;
+#X obj 28 214 f;
+#X obj 115 192 f;
+#X obj 29 21 inlet;
+#X obj -67 351 outlet;
+#X obj 115 234 mtx_zeros;
+#X obj -109 262 mtx_* -1;
+#X obj 46 193 - 2;
+#X obj -110 178 - 1;
+#X obj 179 110 moses 3;
+#X obj -207 177 list split 1;
+#X msg -57 218 \$1;
+#X obj -109 240 mtx_./ 1;
+#X obj 28 46 t l b b l;
+#X obj -68 314 mtx_concat col;
+#X msg -109 198 size 1 \$1;
+#X msg 115 213 \$1 1;
+#X obj 28 281 mtx_concat row;
+#X connect 0 0 19 0;
+#X connect 1 0 14 0;
+#X connect 2 0 11 0;
+#X connect 3 0 0 0;
+#X connect 4 0 18 0;
+#X connect 5 0 15 0;
+#X connect 7 0 19 1;
+#X connect 8 0 16 0;
+#X connect 9 0 3 1;
+#X connect 9 0 4 1;
+#X connect 10 0 17 0;
+#X connect 11 1 10 0;
+#X connect 11 1 9 0;
+#X connect 12 1 1 0;
+#X connect 13 0 14 1;
+#X connect 14 0 8 0;
+#X connect 15 0 12 0;
+#X connect 15 1 3 0;
+#X connect 15 2 4 0;
+#X connect 15 3 2 0;
+#X connect 15 3 13 0;
+#X connect 16 0 6 0;
+#X connect 17 0 1 0;
+#X connect 18 0 7 0;
+#X connect 19 0 16 1;
+#X restore 100 135 pd companion_matrix;
+#X obj 100 47 inlet;
+#X obj 100 159 mtx_eig;
+#X obj 182 223 outlet im;
+#X obj 76 221 outlet re;
+#X connect 0 0 2 0;
+#X connect 1 0 0 0;
+#X connect 2 0 4 0;
+#X connect 2 1 3 0;