How to convert cell to logical?
3 次查看(过去 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!