Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Difference in cumsum/filter
Posted:
Feb 22, 2013 11:42 PM


Hi,
I want to create an ideal, analog integrator for function x(t). Given that x(t) is BL to 500Hz, the integration of a signal x=randn(1000,1) can be replaced by a cumulative sum:
y1 = cumsum(x)
On the other hand, I can transfer the ideal integrator 1/s to zdomain and filter the signal with that:
[numd, dend] = bilinear([1], [1 0], 1000); y2 = filter(numd, dend, x) * 1000;
This works but the error is quite large; I would expect numerical precision under these ideal conditions:
http://snag.gy/jsThi.jpg
What is wrong here and can I fix this? Thanks, Peter



