nanimresize
The Image Processing Toolbox offers a great function called imresize, which conveniently rescales gridded datasets and automatically applies antialiasing. However, because imresize interpolates data, imresize output tends to lose data near NaN boundaries. This function uses John D'Errico's inpaint_nans function before applying imresize, then re-masks NaN output.
Cite As
Chad Greene (2023). nanimresize (https://www.mathworks.com/matlabcentral/fileexchange/56518-nanimresize), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Language Fundamentals > Data Types > Numeric Types > NaNs >
Tags
Acknowledgements
Inspired by: inpaint_nans
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
nanimresize/
nanimresize/html/
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |