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:
how to do Integration using matlab

Subject: how to do Integration using matlab

From: zameer

Date: 1 Apr, 2008 03:58:01

Message: 1 of 3

am doing my final b-tech project and working with an IEEE
paper.Am getting the exact curves but when i integrate using
"trapz(X,Y)" function am getting a value slightly higher
than the value given in the IEEE paper.I think that IEEE
paper author might used another function for integration.
 please tell me whether there is another function with
similar functionality of "trapz(X,Y)" function.
X-is a column matrix
Y- is also a column matrix with the same length as that of X
trapz(X,Y) integrates Y with respect to Y.

please tell me another function similar to trapz give me
any idea for my problem

Subject: how to do Integration using matlab

From: hrh1818

Date: 1 Apr, 2008 14:41:25

Message: 2 of 3

On Mar 31, 10:58 pm, "zameer " <zameer...@yahoo.co.in> wrote:
> am doing my final b-tech project and working with an IEEE
> paper.Am getting the exact curves but when i integrate using
> "trapz(X,Y)" function am getting a value slightly higher
> than the value given in the IEEE paper.I think that IEEE
> paper author might used another function for integration.
> please tell me whether there is another function with
> similar functionality of "trapz(X,Y)" function.
> X-is a column matrix
> Y- is also a column matrix with the same length as that of X
> trapz(X,Y) integrates Y with respect to Y.
>
> please tell me another function similar to trapz give me
> any idea for my problem

Trapz is an elementary integration routine. There are several more
sophisticated integration routines in Matlab that provide higher
accuracy. They all use ode as the first three letters in their name.
A good one to try is ode45. One of the highest accuracy routines is
ode113, but it should only be used with nonstiff problems.

Howard

Subject: how to do Integration using matlab

From: John D'Errico

Date: 1 Apr, 2008 15:12:03

Message: 3 of 3

hrh1818 <hrhan@att.net> wrote in message <95a473fa-28c2-4dc1-8b8b-
d7eaee775851@m36g2000hse.googlegroups.com>...
> On Mar 31, 10:58 pm, "zameer " <zameer...@yahoo.co.in> wrote:
> > am doing my final b-tech project and working with an IEEE
> > paper.Am getting the exact curves but when i integrate using
> > "trapz(X,Y)" function am getting a value slightly higher
> > than the value given in the IEEE paper.I think that IEEE
> > paper author might used another function for integration.
> > please tell me whether there is another function with
> > similar functionality of "trapz(X,Y)" function.
> > X-is a column matrix
> > Y- is also a column matrix with the same length as that of X
> > trapz(X,Y) integrates Y with respect to Y.
> >
> > please tell me another function similar to trapz give me
> > any idea for my problem
>
> Trapz is an elementary integration routine. There are several more
> sophisticated integration routines in Matlab that provide higher
> accuracy. They all use ode as the first three letters in their name.
> A good one to try is ode45. One of the highest accuracy routines is
> ode113, but it should only be used with nonstiff problems.
>
> Howard

Of course, the ode functions are adaptive. They
won't actually work on a list of data points,
much as quad won't integrate a tabulated list.

You can use one of the Simpson's rule variants
on the file exchange, or you can integrate a
spline that interpolates the data.

HTH,
John

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