knanmean

returns the average of matrix X on dimension dim, treating NaNs as missing values.
322 Downloads
Updated 3 Feb 2010

View License

knanmean(X,[dim]) returns the average of matrix X on dimension dim, treating NaNs as missing values.
Contrarly to nanmean, works on n-dimensions matrices

Cite As

Alexandre Reynaud (2024). knanmean (https://www.mathworks.com/matlabcentral/fileexchange/26565-knanmean), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on NaNs in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

Slightly faster/cleaner version, thanks to comments.

1.0.0.0