Forum: GNU Radio Usrp_spectrum_sense.py doubts

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.
36d6b4ceb15343f9e412cc17be319902?d=identicon&s=25 Santi Ortega (Guest)
on 2008-11-12 17:18
(Received via mailing list)
Can anyone explain me this from usrp_spectrum_sense.py (line 55)?

for tap in mywindow:
power += tap*tap

mywindow is done with window.py but I didn't find where is "tap" and
what it
means...
Furthermore, Does "+=" means that increase one unit to the result of
tap*tap?

Sorry if I am a little useless...
6b9e86b84231f94e35327d5747111bcd?d=identicon&s=25 Newman, Timothy (Guest)
on 2008-11-12 17:29
(Received via mailing list)
Your getting into basic python questions now, maybe check out some
python tutorials first.  The "tap" in that for loop just iterates over
each value in mywindow.  The += is the assignment by addition operator,
it adds the value of "tap*tap" to the value of power.



Tim





From: discuss-gnuradio-bounces+trnewman=vt.edu@gnu.org
[mailto:discuss-gnuradio-bounces+trnewman=vt.edu@gnu.org] On Behalf Of
Santi Ortega
Sent: Wednesday, November 12, 2008 11:18 AM
To: discuss-gnuradio@gnu.org
Subject: [Discuss-gnuradio] Usrp_spectrum_sense.py doubts



Can anyone explain me this from usrp_spectrum_sense.py (line 55)?

for tap in mywindow:

power += tap*tap


mywindow is done with window.py but I didn't find where is "tap" and
what it means...
Furthermore, Does "+=" means that increase one unit to the result of
tap*tap?

Sorry if I am a little useless...
This topic is locked and can not be replied to.