How to convert first cell value into zero

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

madhan ravi
madhan ravi il 25 Set 2020
Modificato: madhan ravi il 25 Set 2020
cell_array(cellfun(@isstring, cell_array)) = {0}
  7 Commenti
madhan ravi
madhan ravi il 25 Set 2020
Obviously, the example you showed in your code and your last comment don’t contain the same data.
Masoud Taleb
Masoud Taleb il 25 Set 2020
I tried to simplify the example as my data file and main codes are very big and complicated to be uploaded. Meanwhile, it is possible that something was interfering it. Anyway, thanks for your reply and help :)

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Cell Arrays 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