Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Discrete integration Matlab

Subject: Discrete integration Matlab

From: Jean

Date: 20 Dec, 2010 13:56:14

Message: 1 of 2

  Hello,


  I have a signal and i need its discrete integral. I have tried cumtrapz(), but the values are not good. What else can I try?

  Best regards,
  Jean

Subject: Discrete integration Matlab

From: Walter Roberson

Date: 20 Dec, 2010 15:20:45

Message: 2 of 2

On 20/12/10 7:56 AM, Jean wrote:

> I have a signal and i need its discrete integral. I have tried
> cumtrapz(), but the values are not good. What else can I try?

If you do not have a model of what the equation for the signal is, then
cumtrapz() is numerically the best you can do (except perhaps at the two
endpoints.)

If you *do* have a model of what the equation for the signal is, then
the best numeric method would depend upon the model.

Some people like to do cubic spline interpolation and integrate that;
John D'Errico has a FEX (Matlab File Exchange) submission to assist with
that. Note, though, that that approach is *not* numerically better
unless the physical process that is generating the signals shares the
characteristics of cubic splines.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us