Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/15/02 06:30
Read: times


 
#27269 - RE: moving average
Hi Jon,

you are right, storing also the sum cause faster execution time.

But often an ADC was not used on full speed. E.g. I read out the ADC every 10msec.
Thus my example was written in respect to less data memory and smaller code size.


Rounding should be used on any integer division.
Otherwise e.g. on 15 values of 10 and a single value of 9 the result was still 9 and you have added an error of almost 1 unit.


Peter



List of 12 messages in thread
TopicAuthorDate
moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: Steve            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: Peter.            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      
RE: moving average            01/01/70 00:00      

Back to Subject List