Insert blank cells in a matrix
54 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Emilio Pulli
am 30 Nov. 2021
Kommentiert: Walter Roberson
am 2 Dez. 2021
How can I replace all the NaN values of a matrix with a blank space?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!