How can I convert a matrix to all numeric values which contains numeric and characters both?
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
I have matrix containing both numerics and characters(actually NaNs) values both. How to convert this matrix so that it contains all the numeric values?Because I want to write this matrix to an excel sheet.
Risposte (1)
Rik
il 9 Ago 2018
If you want to replace the NaNs by 0, you can simply use this:
data(isnan(data))=0;
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!