how to decide what input provides the biggest number?
I have four streams of data, and I want to do realtime analysis of which data stream that provides the biggest numbers.
So far I have made a really clumpsy solution with an if-statement: if$i1>$i2 && $i3 then bang
The problem is that I have to bang the if-statement for input 2 and 3 aso. It soon becomes a pain to deal with more than 2 3 datas treams.
I wonder if there is a list object that can tell at what position in a list the highest value is …
have a look at [zl sort] and [zl slice]
----------begin_max5_patcher---------- 669.3oc4X1saaBCE.9ZxSgEWmVw4Xff2c64XpZh.dotieh.GsrV028gsg10N QpASPZpJRfrgX9Ne9XeH4oMd96qOya8Ieg7Mhm2Sa77zco5vqusmeY54rhzV 8s4u+jTVW4u0bopSkhpBtTeM30NqOIeeuGSkY2KpN78Fdlz7DwX31fsDZr5H FLbjbW+WQjqej06e3FHd3QZFZ4uOxMCh+9zpC9j6TW84MaTG1ZYrzA5ddyv. +i5JYq3Q8vBJXrNDwwCQfQ0gUTh5TjNFgjQhwv+FkpzRMJ9esQjVLZzKpj9a cRB7e08vGFeI+rlb+GKHsEhLNAlhev45GpNSHjcQ+fyvOJ4LOwTxaaSOv+Gy DgjDFIDILp6p4RqNBhz1XmVM.DpOEOhaf43lkNgotQRtYcRXBvONggsp4Ki3 kioY+jHLelhYBmZ9RuY.5N8VMraiF2LIqV1hr9vgB9BUuvLoCvGWuX2E2vbI meK4xl5tc1CtxaFnCcpoLR7kx5ilwb6hW9nIsJutrK9utZgZxBRzY9wgWRKy s35+gVAin1ZE5mGq.Iw1ZE7SjU.lsVAVBqnGX+BQ06+YGZ1T8+VU0VepIaXz 52di7Jd47VonJUJ59MIudOgu4dtWjmy0WdPYkh7i0cn0i.1UQoqXYr1DTjMz XjoykjTpCjhw3JRJ5.o.KZEIEbgTLYgHcmEjFMMRcjnPKHp6ECIT6IpewBfw pSXn4MPUsbjUpkrhSXd1rbA.8LL1StpkirhVxJXOq8KXFXELuv2BvJXIqSHq reICf6zrFfuzxQVSrYsNLMwNfmIWfFvdokqh0lr.HbUWvq9SyV7Zk6BtF0Js BUpCntbEKsBUzATWtpkVgJ3BpKV4RlMjhq5xGa1+g4.QcMddyePUl5Dq -----------end_max5_patcher-----------
Lpeak from the Lobjects does this.
Thanks, yes, I know how to find the biggest number, but what I want to do is to find out from which inlet the biggest number came from (at which position in the list is the biggest number) …
Thanks for Lpeak, this is just what I was looking for;-)
use the right outlet from [zl sort] to get the index…
FWIW, maximum object outputs the highest value and it’s index.
I always forget that you can send lists to [maximum]… thanks for that one