Forum: GNU Radio argmax

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fca804b8911d5b7f567921b301595160?d=identicon&s=25 Abram Young (Guest)
on 2007-06-19 01:01
(Received via mailing list)
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
a
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
zeroes
end up in dst2.

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


Abram Young                  Room:       PAS-367
Dept. of Physics             Voice:      520.621.6802
University of Arizona        E-mail:     young@physics.arizona.edu
This topic is locked and can not be replied to.