How to select the range of data based on threshold range of our own choice?

5 views (last 30 days)
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.
I lookforward to receive your suggestions. I tried an approach but it gives logical output which is not suitable for my case.
Tahnk you!
Amjad Iqbal
Amjad Iqbal on 20 Sep 2022
Sorry, for my mistake.
I corrected the ranges (-10 to 0 dB or -20 to -10 dB or -30 to -20) in three classes now, as high, medium and low respectively.
Also the .mat file is attached for reference.
load('output_classes.mat'); % data
imagesc(x_vect, y_vect,20*log10(abs(S_VH)/max(max(abs(S_VH)))),[-45 0]),...
Please have a look, Thank you!

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 20 Sep 2022
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]);
cmap = [0,0,0;
cmap = 4×3
0 0 0 1 0 0 0 1 0 0 0 1
caxis([-40, 0]);
  1 Comment
Amjad Iqbal
Amjad Iqbal on 20 Sep 2022
Much appreciated dear @Image Analyst
It's very fast and much accurate method. Thank you for your kind input and providing solution

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by