pushNaNs

Version 1.0.0.0 (1,93 ko) par Daniel
Pushes NaNs to the bottom of each column of X.
201 téléchargements
Mise à jour 30 avr. 2013

Afficher la licence

X = pushnans(X,truncate)

Pushes nans to the bottom of each column of X. It should be pretty fast.

The second input is an optional flag. If true, the whole-nan rows at the bottom of X are removed.

Two slightly different algorithms are implemented in the function together with a simple check to select the faster version: which is faster depends on what fraction of the input matrix is non-NaN.

Note that only limited testing has been done - please report problems below. I would also be interested to hear if there are more efficient ways of implementing this.

Citation pour cette source

Daniel (2026). pushNaNs (https://fr.mathworks.com/matlabcentral/fileexchange/41559-pushnans), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2012b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur NaNs dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.0.0.0