How to convert first cell value into zero

조회 수: 1 (최근 30일)
Masoud Taleb
Masoud Taleb 2020년 9월 25일
댓글: Masoud Taleb 2020년 9월 25일
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

채택된 답변

madhan ravi
madhan ravi 2020년 9월 25일
편집: madhan ravi 2020년 9월 25일
cell_array(cellfun(@isstring, cell_array)) = {0}
  댓글 수: 7
madhan ravi
madhan ravi 2020년 9월 25일
Obviously, the example you showed in your code and your last comment don’t contain the same data.
Masoud Taleb
Masoud Taleb 2020년 9월 25일
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 :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by