필터 지우기
필터 지우기

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 CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by