Forum: GNU Radio argmax

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Abram Y. (Guest)
on 2007-06-19 03:01
(Received via mailing list)
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:     removed_email_address@domain.invalid
This topic is locked and can not be replied to.