How to convert cell to logical?

조회 수: 2 (최근 30일)
mohd akmal masud
mohd akmal masud 2022년 6월 27일
댓글: KSSV 2022년 6월 27일
Dear all. I have the image grountruth as attached. the image categorical.
Anyone know how to convert it into logical?

채택된 답변

KSSV
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
mohd akmal masud
mohd akmal masud 2022년 6월 27일
Sorry, Its Solved. Thak you sir
KSSV
KSSV 2022년 6월 27일
There is a typo error....string should be 'tumor' not 'tumour'. Edited the answer.....check it now.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by