Cell 'Find And Replace'
Aucune licence
cellData=cellNaNReplace (cellData, replaceWith)
Accepts a cell array and a char/integer and replaces all occurrences of NaN in that cell array with the 'replaceWith' value. This is especially useful when using 'readfromexcel' or other excel importers since they sometimes put NaN instead of empty cells.
Example of usage:
a = num2cell([0 1 2 NaN 4]);
b = cellNaNReplace (a,'');
or, if you're dealing with excel spreadsheets, you can use:
Data = readfromexcel(File,'All');
Data = cellNaNReplace (Data,0);
Enjoy.
Citation pour cette source
Yoav Mor (2026). Cell 'Find And Replace' (https://fr.mathworks.com/matlabcentral/fileexchange/10847-cell-find-and-replace), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
Tags
Remerciements
Inspiré par : readfromexcel
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0.0 |
