How to convert first cell value into zero
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Masoud Taleb
am 25 Sep. 2020
Kommentiert: Masoud Taleb
am 25 Sep. 2020
Hello
I have a array of numbers but the first cell is always a string like below. Is there way that I put ''0" instead of "theta\phi[rad]"? Then, I can do analysis :)
theta\phi[rad] 0 0.01 0.02
0 -0.15 -0.17 -0.14
0.2 0.19 -0.13 -0.11
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 25 Sep. 2020
Bearbeitet: madhan ravi
am 25 Sep. 2020
cell_array(cellfun(@isstring, cell_array)) = {0}
7 Kommentare
madhan ravi
am 25 Sep. 2020
Obviously, the example you showed in your code and your last comment don’t contain the same data.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell Arrays 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!