Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Difference in cumsum/filter
Replies: 1   Last Post: Feb 23, 2013 12:38 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Peter Mairhofer

Posts: 25
Registered: 8/18/10
Difference in cumsum/filter
Posted: Feb 22, 2013 11:42 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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 z-domain
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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.