How to convert first cell value into zero
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
madhan ravi
2020-9-25
编辑:madhan ravi
2020-9-25
cell_array(cellfun(@isstring, cell_array)) = {0}
7 个评论
madhan ravi
2020-9-25
Obviously, the example you showed in your code and your last comment don’t contain the same data.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!