The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 41
Registered: 8/18/10
Re: Difference in cumsum/filter
Posted: Feb 23, 2013 12:38 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 2013-02-22 20:42, Peter Mairhofer wrote:
> Hi,

Sorry, found the problem for myself.

> 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)

This assumes that x(t) is /not/ a piecewise constant function but rather
a sinc interpolation (x(t) is BL to 500).

Therefore it is not an exact result but rather an approximation with the
finite Riemann sum

> 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;

And this does the "real" integration based on the same assumptions on x(t).


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.