Azzera filtri
Azzera filtri

how to place zeros instead of blanks in array

1 visualizzazione (ultimi 30 giorni)
hello everyone, i have a char array of size 358695x3, that is 358695 rows and it is called B, when i write the following code str2num(B) I just have 7000 rows in the output, i found out that B has alot of blanks [] in it so i cannot use str2num, what is the way to fill those blanks in B with zeros please? so i have 358695 rows when i do the str2num on it. help please

Risposta accettata

James Tursa
James Tursa il 7 Dic 2017
If you really mean blank spaces, then e.g.
B(B==' ') = '0';

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by