How to determine the gradient of a point cloud?

24 views (last 30 days)
Suppose that I have a point cloud. The points are unevenly distributed, as shown in the figure below. You can see that the point cloud is not a cube! Each point has an attribute, let' say pressure if you are interested. So, I have (x, y, z) values of these points. I also have a vector of v which is the pressure values of these points.
Now, I want to determine the pressure gradient of each point. The function `gradient()` might help, but it seems that it it just for very even datasets. I want to ask if there is a better method? The interpolation method is allowd.
  5 Comments

Sign in to comment.

Accepted Answer

Abhijeet
Abhijeet on 6 Mar 2023
Hi,
The 'griddata()', 'griddedinterpolant()' or 'scatteredInterpolant()' functions can be used for interpolation of a volume. A brief explanantion of these functions is given below:
  • griddata is a function in MATLAB that performs interpolation on scattered data to produce a grid. It takes as input a set of scattered data points (x, y, z) and produces a grid of interpolated values using one of several interpolation methods. Documentation : griddata
  • scatteredInterpolant is another function in MATLAB that performs interpolation on scattered data points. However, it uses a different approach that involves constructing a function from the scattered data points rather than producing a grid of interpolated values. This function can then be evaluated at any point within the domain of the scattered data. Documentation : ScatteredInterpolant
  • griddedInterpolant is similar to scatteredInterpolant, but it is designed for interpolation on a regular grid rather than scattered data. It takes as input a grid of data points and produces a function that can be evaluated at any point within the domain of the grid. This function can then be used to perform interpolation on the grid at any point within the domain. Documentation : griddedInterpolant

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!