scattereredInterpolant
太慢,只使用一个核心。我希望有人知道更有效的替代方案。我认为瓶颈是delaunay三角测量,我知道有多线程实现它应该快40-50倍(见here和here)。
scatteredInterpolant()
的示例用法如下:
% Scattered input locations and function values.
x = scattered_x_coordiantes;
y = scattered_y_coordinates;
f = function_values_at_x_and_y;
% Construct the scatteredInterpolant object.
Q = scatteredInterpolant( [x(:) y(:)], f(:), 'linear', 'none' );
% Resample to an rectilinear grid.
[U,V] = meshgrid( ustart:du:ustop, vstart:dv:vstop );
Z = Q(U(:),V(:));