How to select the range of data based on threshold range of our own choice?
3 次查看(过去 30 天)
显示 更早的评论
Dear MATLAB experts,
I want to use only the points corresponding to relatively high amplitudes? (e.g., try -10 to 0 dB or -20 to -10 dB or -30 to -20 on the normalized plots).
In attached imaging data output which veries from -45 to 0 dB.
I want to make 3 classes and plot data in with 3 classes and 3 colors.
. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1130725/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1130725/image.jpeg)
I lookforward to receive your suggestions. I tried an approach but it gives logical output which is not suitable for my case.
Tahnk you!
2 个评论
Image Analyst
2022-9-20
You can adapt the colormap to have only 3 colors. Please attach your original image varible in a .mat file if you want anybody to try anything. What do you want to be the color if the value is outside your ranges? Why do your three ranges (-10 to 0 dB, or -20 to 10 dB, or -30 to -10) overlap? For example a -15 : which class should it be in the second or the third???
采纳的回答
Image Analyst
2022-9-20
Try this:
load('output_classes.mat'); % data
intensity = 20*log10(abs(S_VH)/max(max(abs(S_VH))));
imagesc(x_vect, y_vect, intensity,[-45 0]);
axis('equal');
axis('tight');
title('Output');
cmap = [0,0,0;
1,0,0;
0,1,0;
0,0,1
]
colormap(cmap);
colorbar;
caxis([-40, 0]);
set(gca,'FontSize',14)
grid;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 National Instruments Frame Grabbers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!