discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Finding max index in a vector


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Finding max index in a vector
Date: Fri, 25 Apr 2014 12:14:27 -0400

On Thu, Apr 24, 2014 at 11:32 AM, Ed Criscuolo <address@hidden> wrote:
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

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

 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]