Filter löschen
Filter löschen

How to determine the gradient of a point cloud?

36 Ansichten (letzte 30 Tage)
Tingchang Yin
Tingchang Yin am 3 Mär. 2023
Beantwortet: Abhijeet am 6 Mär. 2023
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 Kommentare
Walter Roberson
Walter Roberson am 3 Mär. 2023
See griddata or scatteredInterpolant
Tingchang Yin
Tingchang Yin am 3 Mär. 2023
Bearbeitet: Tingchang Yin am 3 Mär. 2023
Yes. It works! Thank you!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Abhijeet
Abhijeet am 6 Mär. 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

Weitere Antworten (0)

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by