Integrate Data in MATLAB: Solving with FOR Loops

  • Context: MATLAB 
  • Thread starter Thread starter TheFerruccio
  • Start date Start date
  • Tags Tags
    Data Integrate Matlab
Click For Summary
SUMMARY

The discussion focuses on integrating data in MATLAB using FOR loops and the search for built-in commands that can integrate based on coordinates. Users have noted that while FOR loops can provide a solution, they may not yield accurate results, as they typically rely on approximating areas under curves through rectangles. The conversation highlights the availability of various numerical methods for integration in MATLAB, encouraging users to explore external resources for more precise functions.

PREREQUISITES
  • Familiarity with MATLAB programming and syntax
  • Understanding of numerical integration concepts
  • Knowledge of FOR loops and their application in MATLAB
  • Basic understanding of coordinate systems and their relevance in integration
NEXT STEPS
  • Research MATLAB built-in functions for numerical integration, such as 'trapz' and 'integral'
  • Explore external resources for numerical integration methods in MATLAB
  • Learn about advanced numerical methods like Simpson's rule and their implementation in MATLAB
  • Investigate how to optimize FOR loops for better performance in MATLAB
USEFUL FOR

This discussion is beneficial for MATLAB users, data analysts, and engineers looking to improve their data integration techniques and enhance the accuracy of their numerical computations.

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
 

Similar threads

Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K