MATLAB: How to interpolate a non-uniform 3D gridded data to an uniform 3D gridded data

3d interpolationgridinterpolation

Hi all, I am very new to MATLAB. I have a data set of x,y,z coordinates of a grid and corresponding velocity vectors at each point. It goes somewhat like given below. The red color highlight depicts the coordinates of the grid points (X, Y, Z) and the green color highlight depicts the wind vectors (u,v,w) at that point. This is a non-uniform gridded data. How can I use this data set to generate a uniform gridded data? This means I need to generate uniform grid points in Xi, Yi, Zi directions and generate their corresponding wind vectors ui, vi, wi at each point?

Best Answer

Create a uniform grid Xi, Yi, Zi, then use griddata to interpolate your data on the regular grid.