# [PD] get maximum and its position of an array

david golightly davigoli at hotmail.com
Sat Aug 13 17:49:17 CEST 2005

```RaiaCarlos-

How's this?  There may be a simpler way to do this, but it certainly gets
the job done.

-David

#N canvas 0 22 638 304 10;
#X obj 154 50 arraysize \\$0-my-array;
#N canvas 0 0 450 300 graph2 0;
#X array \\$0-my-array 10 float 3;
#A 0 1 -5 13 2 -1 8 3 -4 5 -2;
#X coords 0 15 9 -15 200 140 1;
#X restore 418 46 graph;
#X obj 40 225 \\$0;
#X msg 110 181 bang;
#X obj 154 89 until;
#X obj 154 165 moses -10000;
#X obj 181 200 f;
#X obj 154 108 0;
#X obj 179 108 + 1;
#X msg 201 87 0;
#X obj 154 145 tabread \\$0-my-array;
#X floatatom 181 220 5 0 0 0 maximum - -;
#X msg 154 31 bang;
#X obj 295 187 f;
#X obj 154 126 t f f;
#X floatatom 295 222 5 0 0 0 position - -;
#X obj 209 199 t f b;
#X msg 231 87 -10000;
#X obj 154 69 t f b b;
#X msg 40 246 \; \\$1-my-array 0 1 -5 13 2 -1 8 3 -4 5 -2;
#X connect 0 0 19 0;
#X connect 2 0 3 0;
#X connect 3 0 20 0;
#X connect 4 0 3 0;
#X connect 5 0 8 0;
#X connect 6 1 17 0;
#X connect 7 0 6 1;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 8 0 15 0;
#X connect 9 0 8 1;
#X connect 10 0 8 1;
#X connect 11 0 6 0;
#X connect 13 0 0 0;
#X connect 14 0 16 0;
#X connect 15 0 11 0;
#X connect 15 1 14 1;
#X connect 17 0 7 0;
#X connect 17 1 14 0;
#X connect 18 0 6 1;
#X connect 19 0 5 0;
#X connect 19 1 10 0;
#X connect 19 2 18 0;

>From: "Raia Cartos" <RaiaCartos at gmx.de>
>To: <pd-list at iem.at>
>Subject: [PD] get maximum and its position of an array
>Date: Sat, 13 Aug 2005 12:41:02 +0200
>
>Hello guys,
>
>
>
>how can help me?
>
>I would like to get the maximum and its position of an array.
>
>I didn't find an object doing this.
>
>
>
>Thanks a lot!
>
>
>
>RaiaCartos
>
>_______________________________________________
>PD-list at iem.at mailing list
>UNSUBSCRIBE and account-management ->
>http://lists.puredata.info/listinfo/pd-list

```