aboutsummaryrefslogtreecommitdiff
path: root/abs
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2006-08-17 15:51:30 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2006-08-17 15:51:30 +0000
commitea9cefccc82570c6e9804a1688510cba63d4ae32 (patch)
tree7e10bde0e8b1c96a05651d51424923f381d5b87b /abs
parentfaa4e3eaa3736a788697e7bf6830040741df1166 (diff)
mtx_ispeak is a peak finder that locates peak values in the rows of a matrix.
svn path=/trunk/externals/iem/iemmatrix/; revision=5640
Diffstat (limited to 'abs')
-rw-r--r--abs/mtx_ispeak-help.pd70
-rw-r--r--abs/mtx_ispeak.pd22
2 files changed, 92 insertions, 0 deletions
diff --git a/abs/mtx_ispeak-help.pd b/abs/mtx_ispeak-help.pd
new file mode 100644
index 0000000..e8badbb
--- /dev/null
+++ b/abs/mtx_ispeak-help.pd
@@ -0,0 +1,70 @@
+#N canvas 83 338 841 379 10;
+#X text 482 28 part of iemmatrix;
+#X text 43 34 [mtx_ispeak];
+#X text 166 69 searches for peaks in the rows of a matrix. peak locations
+are set to 1 \, others to 0;
+#N canvas 0 0 450 300 convert2tablemsg 0;
+#X obj 130 35 inlet;
+#X obj 169 216 outlet;
+#X obj 130 60 t a a;
+#X obj 160 82 mtx_size;
+#X obj 130 107 list split 3;
+#X obj 220 107 change;
+#X msg 220 129 resize \$1;
+#X obj 169 154 list prepend 0;
+#X connect 0 0 2 0;
+#X connect 2 0 4 0;
+#X connect 2 1 3 0;
+#X connect 3 1 5 0;
+#X connect 4 1 7 0;
+#X connect 5 0 6 0;
+#X connect 6 0 1 0;
+#X connect 7 0 1 0;
+#X restore 33 284 pd convert2tablemsg;
+#X obj 33 306 s view_peaks;
+#N canvas 0 0 450 300 graph1 0;
+#X array view_peaks 20 float 1;
+#A 0 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1;
+#X coords 0 1 19 0 200 20 1;
+#X restore 327 192 graph;
+#N canvas 0 0 450 300 graph1 0;
+#X array view_landscape 20 float 1;
+#A 0 0 0 0 0 2 2 2 0 0 0 0 2 3 1 3 3 3 0 0 3;
+#X coords 0 3 19 0 200 50 1;
+#X restore 326 228 graph;
+#N canvas 0 0 450 300 convert2tablemsg 0;
+#X obj 130 35 inlet;
+#X obj 169 216 outlet;
+#X obj 130 60 t a a;
+#X obj 160 82 mtx_size;
+#X obj 130 107 list split 3;
+#X msg 220 129 resize \$1;
+#X obj 169 154 list prepend 0;
+#X obj 220 107 change;
+#X connect 0 0 2 0;
+#X connect 2 0 4 0;
+#X connect 2 1 3 0;
+#X connect 3 1 7 0;
+#X connect 4 1 6 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 5 0;
+#X restore 172 284 pd convert2tablemsg;
+#X obj 33 165 mtx_rand;
+#X obj 172 306 s view_landscape;
+#X text 268 138 inletA: matrix/vector containing values (landscape)
+;
+#X text 268 157 outletB: matrix/vector logical 1 at peaks;
+#X obj 33 205 mtx_int;
+#X obj 33 185 mtx_* 4;
+#X msg 33 143 1 20;
+#X text 301 307 (note: bad performance at edges and larger peaks);
+#X obj 33 242 mtx_ispeak;
+#X connect 3 0 4 0;
+#X connect 7 0 9 0;
+#X connect 8 0 13 0;
+#X connect 12 0 7 0;
+#X connect 12 0 16 0;
+#X connect 13 0 12 0;
+#X connect 14 0 8 0;
+#X connect 16 0 3 0;
diff --git a/abs/mtx_ispeak.pd b/abs/mtx_ispeak.pd
new file mode 100644
index 0000000..212ed61
--- /dev/null
+++ b/abs/mtx_ispeak.pd
@@ -0,0 +1,22 @@
+#N canvas 0 0 540 300 10;
+#X obj 162 43 inlet;
+#X obj 162 218 outlet;
+#X obj 162 119 t a a;
+#X obj 162 160 mtx_&&;
+#X obj 222 140 mtx_<= 0;
+#X obj 162 140 mtx_>= 0;
+#X obj 162 98 mtx_diff row -1;
+#X obj 222 121 mtx_roll 1;
+#X text 319 77 searches;
+#X text 312 102 matrix rows;
+#X text 310 128 for peaks;
+#X text 290 163 returns 1 at peak location;
+#X text 339 185 0 elsewhere;
+#X connect 0 0 6 0;
+#X connect 2 0 5 0;
+#X connect 2 1 7 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 1;
+#X connect 5 0 3 0;
+#X connect 6 0 2 0;
+#X connect 7 0 4 0;