MATLAB: How to convert first cell value into zero

convert first cell to zerostring to number

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

Best Answer

cell_array(cellfun(@isstring, cell_array)) = {0}