Finding max index in a vector

How do I find the index of the max value in a vector from GRC?
The max_xx block outputs the max value, but not its
index, despite what it’s documentation says:

“Data is passed in as a vector of length from multiple input sources.
It will look through these streams of data items and output two
streams. Stream 0 will contain the index value in the vector where the
maximum value occurred.”

I checked the code template for max (GR v3.7.3), and it doesn’t even
seem to retain the index of the max it reports.

@(^.^)@ Ed

On Thu, Apr 24, 2014 at 11:32 AM, Ed Criscuolo
[email protected]wrote:

I checked the code template for max (GR v3.7.3), and it doesn’t even
seem to retain the index of the max it reports.

@(^.^)@ Ed

Ed,

Yeah, this block does not match the description. It simply outputs the
maximum value for a given vector of samples. I’m going to fix this now
since I’m about to push a few other changes.

I can see a use for having the block have an optional secondary stream
with
the index value, though.

Tom

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ed,
I’m on a train. I wanted to try out how long it takes to do it
including implementing rudimentary QA. So I just went ahead and tried:
about 205s, most spent on figuring out how to get the IO signature
straight.
Enjoy: Max index filter block · GitHub

Greetings,
Marcus

On 24.04.2014 17:32, Ed Criscuolo wrote:

I checked the code template for max (GR v3.7.3), and it doesn’t
even seem to retain the index of the max it reports.

@(^.^)@ Ed

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
Discuss-gnuradio Info Page
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTWon3AAoJEBQ6EdjyzlHtPcYH/jPOuxdSWizdAEUNK2fipCSp
0B7M7kKcx7QDNTma27uK80NUQzpIEd7H5QZi1ZUu4xl4/QasDnhjaDSJvnjSxzrb
LQfBdQZPQs6ce7rtGVMG/i+d8iz/Y0coXRexrOFUTKbS1eECJpUTPlKklRQKM98n
F6uoF4XBidb0sSPbxQXbCge5Fb7FDOp9MF182vRaRC08dzuxViQW7XMWl8H5D6zT
UYoqrin2OzhhUpqG5c2Qm4wyb+ow+I/0aX2E29V0Wv0ge5hI3thWvHiOStdej5a8
3JZygHgJdzlvz/6Pzr2WTnsydZ3AbN5eGWgusNj/3CUgwlQ7r2dy2ccLyKEZqRQ=
=dI/U
-----END PGP SIGNATURE-----