Hi Tom,

On 9/30/19 3:27 PM, tom sutherland via Discuss-gnuradio wrote:
How do you determine the index of the maximum value of the output of a FFT? e.g. I have a FFT  and then a "ComplexToMag^2" block and I want to know the max value and its corresponding index (i.e. for a 4096 point FFT the index occured at 63).

The argmax block will give you the index to the vector element with the largest value. Set its number of inputs to 1, and the vector length as appropriate. The 'max_vec' output gives the number you are looking for.

As there is only one vector, the 'max_inp' should be connected to a null sink. (I would argue that the port in question should disappear when there's only one input).

For the value itself, there's the 'max' block, set number of inputs and length of output vector to 1.

Regards, Paul Boven.

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to