discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Cumsum block on GRC


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Cumsum block on GRC
Date: Sat, 7 May 2011 15:53:40 +0100

On Sat, May 7, 2011 at 3:44 PM, mehmet kabasakal <address@hidden> wrote:
Hi List,

I am trying to write a block, that finds the cumulative sum of the points.
But when i run the block on GRC, the output of the block becomes as in
the attached figure. It wraps for a period of time. I expect it to go
negatively downwards. Because i am accumulating negative values. I
couldn't understand the reason. Is there something missing in the
code. The c++ code of the block is attached also.

Thanks for the help!
Mehmet.


Mehmet,
It looks like it's because you are setting out[0] = 0 before entering the for loop in your work function. This will then reset the counter every time you enter work.

Tom


reply via email to

[Prev in Thread] Current Thread [Next in Thread]