write a matrix to a text file
Afficher commentaires plus anciens
I'd like to write a matrix into a text file, but I don't want elements with NaN value appear in the file, instead I want an empty space for each NaN value, here is a part of the matrix:
- 1 NaN NaN NaN NaN
- 3 4 4 NaN NaN
- 6 1 NaN NaN NaN
- 2 2 NaN NaN NaN
- 4 4 5 NaN NaN
- 6 2 3 2 NaN
thanks!
1 commentaire
Walter Roberson
le 22 Juin 2011
Are the NaN certain to be at the end of the line? If not then a different method would have to be used.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!