I’m having trouble with gr.argmax_fs()

gr.max_ss() seems to work fine returning the max value of a vector. And
(argmax, 0) works fine to return the vector position with the max value.
But (argmax, 1) never returns anything but zero.

I’m probably missing something very obvious, such as a type mismatch or
fundamental misunderstanding, but…

—code snippet—

 src = usrp.source_s (0, decim, 1, gru.hexint(mux))

 s2f = gr.short_to_float()
 vec = gr.stream_to_vector(gr.sizeof_float, fft_size)
 fft = gr.fft_vfc(fft_size, True, [])
 abs = gr.complex_to_mag(fft_size)
 argmax = gr.argmax_fs(fft_size)
 dst1 = gr.file_sink (gr.sizeof_short, "out1")
 dst2 = gr.file_sink (gr.sizeof_short, "out2")

 fg.connect(src, s2f, vec, fft, abs, argmax)
 fg.connect((argmax, 0), dst1)
 fg.connect((argmax, 1), dst2)

—end code snippet—

the vector position of the max of a vector ends up in dst1, but all
end up in dst2.

If you can correct whatever I’ve screwed up, thanks,

Abram Y. Room: PAS-367
Dept. of Physics Voice: 520.621.6802
University of Arizona E-mail: [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs