How to mask the data of no information?
8 views (last 30 days)
Show older comments
Dear Matlab experts,
I need to mask out data with no information and want to keep data for only targets of interest.
I have attached one image in which data with no information is masked out and retain with target information.
I have attached .mat file, could you please guide on how to mask the information of no use and get only target region?
Thank you!
Best Regards,
Amjad
load('two_targets.mat'); % data
imagesc(intensity,[-45 0]);
I need to keep target area as given in image below and maskout information of no use for spatial mean operation.


I used to cut data or keep points of target but it affects spatial mean operation.
Accepted Answer
Chunru
on 22 Sep 2022
websave("two_targets.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1132000/Two_targets.mat");
load('two_targets.mat'); % data
imagesc(intensity,[-45 0]);
intensity(intensity<-20) = nan;
figure
imagesc(intensity,[-45 0]);
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!