10 lines
288 B
Matlab
10 lines
288 B
Matlab
function grid = interp_slice_to_grid(slice, xg, yg)
|
|
%INTERP_SLICE_TO_GRID Interpolate scattered slice data onto regular grid.
|
|
[Xg, Yg] = meshgrid(xg, yg);
|
|
F = scatteredInterpolant(slice.x, slice.y, slice.val, 'linear', 'none');
|
|
Zg = F(Xg, Yg);
|
|
grid.X = Xg;
|
|
grid.Y = Yg;
|
|
grid.Z = Zg;
|
|
end
|