Integrate Data in MATLAB: Solving with FOR Loops

  • Context: MATLAB 
  • Thread starter Thread starter TheFerruccio
  • Start date Start date
  • Tags Tags
    Data Integrate Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 14K views
TheFerruccio
Messages
216
Reaction score
0
I've been reading up in the help files on MATLAB for this one, but it's a bit tricky.

I have been able to solve it on my own by using a FOR loop, but it's not completely accurate as it's just adding up rectangles at the average between two values.

Here's the problem:

Does there exist a MATLAB command that can integrate something based on just coordinates?
 
Physics news on Phys.org
TheFerruccio said:
I've been reading up in the help files on MATLAB for this one, but it's a bit tricky.

I have been able to solve it on my own by using a FOR loop, but it's not completely accurate as it's just adding up rectangles at the average between two values.

Here's the problem:

Does there exist a MATLAB command that can integrate something based on just coordinates?

There are different numerical methods to achieve this.
http://numericalmethods.eng.usf.edu/mtl/gen/07int/index.html

Depends what you want to use. I don't know about the built in functions but it is easier to google for numerical integration MATLAB functions which can be used by your MATLAB file.
e.g.
http://web.cecs.pdx.edu/~gerry/nmm/mfiles/byChapter.html
Scroll down to Contents of integrate directory