convert an empty cell to a string

조회 수: 14 (최근 30일)
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI 2022년 1월 12일
댓글: NAFTALI HERSCOVICI 2022년 1월 12일
Hello,
I have this cell A={[NaN]} that I need to convert it into a string
Any ideas?
Thanks

채택된 답변

Cris LaPierre
Cris LaPierre 2022년 1월 12일
I guess it depends on what you want the empty string value to be. The code is straightforward enough.
A={[NaN]}
A = 1×1 cell array
{[NaN]}
B = string(A)
B = <missing>
You can read more about what MATLAB uses for missing values for the different data types here.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by