convert cell to integer
조회 수: 185 (최근 30일)
이전 댓글 표시
I have a 1*1 cell in which its content is ineger. I need to convert the content to integer (no cell anymore just like a number itself)
how can I do that?
I tied cell2mat but did not work. It is like this now:
kar =
1×1 cell array
{[3]}
답변 (1개)
Star Strider
2019년 8월 16일
If ‘kar’ is initially:
kar = {{[3]}};
try this:
n = cell2mat(kar{:})
producing:
n =
3
참고 항목
카테고리
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!