Find maximum in graphic

1 回表示 (過去 30 日間)
Miguel Albuquerque
Miguel Albuquerque 2022 年 7 月 1 日
回答済み: Mathieu NOE 2022 年 7 月 4 日
Hey guys thanks in advance;
I have this code that represents a signal in time domain:
figure;
maxcolorbar=max(max(20*log10(abs(range_compressed_matrix))));
imagesc(1:400,time_compression_cut*c,abs(range_compressed_matrix));
colorbar;
colormap(jet);
%caxis([maxcolorbar-20 maxcolorbar]);
title('Range Compressed Data');
xlabel('Waypoints (m)');
ylabel('Range (m)');
xlim([0 400]);
And I get this figure:
I want to know the mamixum os this figure, I can see its in the red lines, however I dont know which is higher and for what range and waypoint that value is.
Thanks a lot

採用された回答

Mathieu NOE
Mathieu NOE 2022 年 7 月 4 日
hello
following this example :
A = [1 2 3; 4 5 6]
[M,ind] = max(A,[],'all','linear') % max value of matrix
[row,col] = ind2sub(size(A),ind) ; % Convert linear indices to subscripts
applied to your code : the result appears in x_max and y_max
still I wonder why you compute the max of the log of the data but you display them in linear range
figure;
A = 20*log10(abs(range_compressed_matrix));
[maxcolorbar,ind] = max(A,[],'all','linear'); % max value of matrix
[row,col] = ind2sub(size(A),ind); ; % Convert linear indices to subscripts
xx = 1:400;
yy = time_compression_cut*c;
x_max = xx(row);
y_max = yy(col);
imagesc(xx,yy,abs(range_compressed_matrix));
colorbar;
colormap(jet);
%caxis([maxcolorbar-20 maxcolorbar]);
title('Range Compressed Data');
xlabel('Waypoints (m)');
ylabel('Range (m)');
xlim([0 400]);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by