Insert blank cells in a matrix
42 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Emilio Pulli
le 30 Nov 2021
Commenté : Walter Roberson
le 2 Déc 2021
How can I replace all the NaN values of a matrix with a blank space?
0 commentaires
Réponse acceptée
Walter Roberson
le 30 Nov 2021
You cannot do that. Numeric matrices cannot have spaces in them.
You can convert the matrix into a cell array and put spaces into the cell array... but it is not clear why you would do that.
myCell = num2cell(MyMatrix);
myCell(isnan(MyMatrix)) = {' '}; %nan -> space
Now what?
12 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!