Double integration in Matlab on given data set

In summary, the problem is to find a way to achieve a double integral involving a contour function and coordinates of a strand in Matlab. The proposed solutions include turning the integral into a sum, extrapolating a contour function from the coordinates, averaging all possible shapes, and calculating distances between points on the curve. The person seeking help hopes to find a solution to this problem.
  • #1
ALYAZAN
12
0

Homework Statement



Hello,

I have a problem

I have a strand (pathway) defined in Matlab as X and Y and s where X and Y are the coordinates and s is an indexing (1, 2, 3, ...), and I can have this X and Y in high resultion, namely very small distance between them

I need to achieve this double integral

0 L0 L < ( r (s1) - r (s2) )2 > ds1 ds2where L is known (the length of the strand) and r is the representation of the curve, namely a contour function of the strand !

I have no idea how to achieve such an integral !

hope you can help me

Alyazan

Homework Equations


The Attempt at a Solution



1- I thought about turning this integral into a sum ! but I am not sure how to do that

2- I thought also about extrapolating a contour function r (s) from my X and Y data set but still I have very different shapes of strands everynow and then which look just like worms !
 
Last edited:
Physics news on Phys.org
  • #2
3- I thought about taking the average of all possible shapes that I have and then extrapolate the contour function, but still I have no idea how to do it 4- I thought about calculating the distance between two points on the curves and then summing them up ! but still I don't know how to calculate those distances I hope you can help me in this problem ! Alyazan
 

Related to Double integration in Matlab on given data set

1. What is double integration in Matlab?

Double integration in Matlab is a numerical method used to approximate the area under a curve in a two-dimensional space. It involves finding the sum of the small rectangles that make up the area under the curve, using a step size determined by the user.

2. How do I perform double integration on a given data set in Matlab?

To perform double integration on a given data set in Matlab, you can use the "trapz" function. This function takes in the x and y values of the data set as inputs and calculates the area under the curve using the Trapezoidal Rule. You can also use the "integral2" function for more accurate results, which takes in a function handle and the limits of integration as inputs.

3. What is the difference between single and double integration?

The main difference between single and double integration is the number of variables involved. Single integration involves finding the area under a curve in a one-dimensional space, while double integration involves finding the volume under a surface in a two-dimensional space.

4. How do I choose the step size for double integration in Matlab?

The step size for double integration in Matlab is chosen by the user based on the desired accuracy of the result. A smaller step size will result in a more accurate approximation, but will also increase the computation time. It is important to choose a step size that balances accuracy and efficiency.

5. Can I perform double integration on non-uniformly spaced data in Matlab?

Yes, you can perform double integration on non-uniformly spaced data in Matlab by using the "trapz" function. This function can handle non-uniform spacing in the x values of the data set. However, for more accurate results, it is recommended to interpolate the data to a uniform grid before performing double integration.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
540
  • Calculus and Beyond Homework Help
Replies
1
Views
689
  • Calculus and Beyond Homework Help
Replies
3
Views
685
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
771
  • Calculus and Beyond Homework Help
Replies
3
Views
973
  • Calculus and Beyond Homework Help
Replies
4
Views
997
Back
Top