Merging Cell Array Elements in One Element
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello,
I have a cell array and its elements are like
1x4 cell array
{'1A'}
{'2B'}
{'3C'}
{'4D'}
I don't want to access them seperately, what I want is merge them like
1x1 cell array
{'1A2B3C4D'}
so that I can convert it to decimal easily. How can I do that? Thank you.
댓글 수: 0
채택된 답변
VINAYAK LUHA
2022년 6월 3일
Hi ,
CellArr ={'1A','2B','3C','4D'}
MergedCellArr = [CellArr{:}]
DecValue = hex2dec(MergedCellArr)
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!