필터 지우기
필터 지우기

Remove quotation sign from values in cell

조회 수: 1 (최근 30일)
Joel
Joel 2023년 4월 6일
편집: Stephen23 2023년 4월 11일
I have a 730x1 cell looking like this:
'1.3'
'1.0'
'0.2'
'0.9'
'-0.4'
'-1.0'
>> u{1}
ans =
'1.3'
How do I remove the quotation signs?
  댓글 수: 1
Stephen23
Stephen23 2023년 4월 11일
편집: Stephen23 2023년 4월 11일
"How do I remove the quotation signs?"
You can't, because they are not there. They are just an artifact of how character arrays are displayed.
And just to make it clear, Star Strider's answer does not "remove" any quotation signs from text data, it actually converts text data into numeric (just as the STR2DOUBLE documentation explains).

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

채택된 답변

Star Strider
Star Strider 2023년 4월 6일
Without knowing more, see if the str2double funciton will do what you want.
  댓글 수: 2
Joel
Joel 2023년 4월 11일
Perfect, thank you
Star Strider
Star Strider 2023년 4월 11일
As always, my pleasure!

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by