NANINTERP2: 2-D optimized linear interpolation

版本 1.1 (296.7 KB) 作者: François Beauducel
Filling the gaps in a surface.
241.0 次下载
更新时间 2021/1/8

The GRIDDATA Matlab's core function may fail with memory issue on huge grids, depending on your computer capabilities. This simple function optimizes the linear interpolation, by reducing the amount of relevant data (only gap neighbours) before calling GRIDDATA. This results in a very fast computing, the speed will depend now on the amount of gaps and less on the amount of valid data (size of the grid).
Example:
z = peaks(1000);
% simulates random gaps of different sizes
for n = [10,5,2]
z(ceil(rand(1e4/n^2,1)*numel(z))) = NaN;
z = conv2(z,ones(n)/n,'same');
end

subplot(211)
imagesc(z); % with gaps
subplot(212)
imagesc(naninterp2(z)) % gaps filled

引用格式

François Beauducel (2024). NANINTERP2: 2-D optimized linear interpolation (https://github.com/beaudu/naninterp2/releases/tag/v1.1), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1

See release notes for this release on GitHub: https://github.com/beaudu/naninterp2/releases/tag/v1.1

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库