How to convert cell to logical?
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all. I have the image grountruth as attached. the image categorical.
Anyone know how to convert it into logical?
댓글 수: 0
채택된 답변
KSSV
2022년 6월 27일
편집: KSSV
2022년 6월 27일
You can use ismember. Let L be your categorical data of size 128*128*64. I see that, there are two data background, tumour. You can have 0 in background and 1 in tumour, using:
idx = ismember(L,'tumor') ;
댓글 수: 5
KSSV
2022년 6월 27일
There is a typo error....string should be 'tumor' not 'tumour'. Edited the answer.....check it now.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!