FILLNANS

版本 1.0.0.0 (2.3 KB) 作者: Ian Howat
FILLNANS replaces all NaNs in array using inverse-distance weighting between non-NaN values.
4.1K 次下载
更新时间 2007/7/18

查看许可证

FILLNANS replaces all NaNs in array using inverse-distance weighting.
Y = FILLNANS(X) replaces all NaNs in the vector or array X by inverse-distance weighted interpolation:
Y = sum(X/D^3)/sum(1/D^3)
where D is the distance (in pixels) from the NaN node to all non-NaN values X. Values farther from a known non-NaN value will tend toward the average of all the values.

Y = FILLNANS(...,'power',p) uses a power of p in the weighting function. The higher the value of p, the stronger the weighting.

Y = FILLNANS(...,'radius',d) only used pixels < d pixels away for weighted averaging.

NOTE: Use in conjunction with INVDISTGRID to grid and interpolate x,y,z data.

See also INPAINT_NANS

引用格式

Ian Howat (2024). FILLNANS (https://www.mathworks.com/matlabcentral/fileexchange/15590-fillnans), MATLAB Central File Exchange. 检索时间: .

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

Community Treasure Hunt

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

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

Adopted several code efficiency revisions made by Urs, including removing the waitbar.