ndwmean

Version 1.1.0.0 (2,41 KB) von Russell
Up to n-dimensional weighted mean or average of an array with NaN support
174 Downloads
Aktualisiert 17 Apr 2014

Lizenz anzeigen

ndwmean(array,weights,directions) calculates the n-dimensional weighted mean of an array. The size of the weighting array and the optional input "directions" determine the dimensions in which the weighted mean is applied (see examples). Supports NaN values.

Examples: x = rand(3,3,3,2)
ndwmean(x,rand(1,2)) % 4th dimension
ndwmean(x,rand(3,2),[2 4]) % 2nd and 4th dimensions
ndwmean(x,rand(1,3,1,2)) % 2nd and 4th dimensions
ndwmean(x,rand(1,3)) % 3rd dimension
ndwmean(x,rand(3,3)) % 2nd and 3rd dimensions

Zitieren als

Russell (2024). ndwmean (https://www.mathworks.com/matlabcentral/fileexchange/45229-ndwmean), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2013a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.1.0.0

Added support for arrays with NaN values.

1.0.0.0