Plotting an array of vectors

Hi everyone,
I'm trying to display some row of an array that represent a signal compressed after the matched filtering. Each row contains the compressed signal for the azimuth position (y-axis).
I know that with python it is possible and the result is reported below.
Is there a way to do the same with Matlab?

4 件のコメント

darova
darova 2020 年 2 月 22 日
I usually use plot for drawing/ploting. What about you?
Salvatore Savastano
Salvatore Savastano 2020 年 2 月 22 日
Hi darova,
yes me too, but if I trying to do it (for example considering the abs value of the signal in the 1st and the 50th row) I obtain something like in attachment.
Obviously, it is not I want to achieve. I'm thinking it's like a sort of an array of plot and so I should work with subplo function but also in this case it's not the same as in above figure.
dpb
dpb 2020 年 2 月 22 日
Can't see fig w/o download; attach an image as others.
plot() will draw lines by column of input array; those obviously had fixed offset between each dataset. Do your data have such already? If not, you'll need to introduce such.
Salvatore Savastano
Salvatore Savastano 2020 年 2 月 22 日
Hi dpb,
I've just attached the image.
I try to be clearer: the two plots represent the a compressed signal and they appear as a sinc-function. I would like to have int the same figure their plot that don't overlap, similarly to the first figure above.
Thank you in advance.

サインインしてコメントする。

回答 (2 件)

darova
darova 2020 年 2 月 22 日
編集済み: darova 2020 年 2 月 22 日

0 投票

Try following
h = get(gca);
% h = get(gca,'children'); % or try this
y = get(h(1),'ydata');
set(h(1),'ydata',y+50)
dpb
dpb 2020 年 2 月 22 日
編集済み: dpb 2020 年 2 月 22 日

0 投票

Your data are nothing at all like that of the other figures; hence it's not surprising they don't plot similar-looking graphs.
Your data have a range of some 5-10 X 10^4 and a strong peak at one location the only real feature whereas the other data are more-or-less sinusoidal with amplitude of roughly +/-10 about the means. Hence, adding something like 30 or so to each trace separates each in it's entirety. You'd have to add
>> round(max(Y(:,1)),-2)
ans =
400
>>
to the second trace to move it to be above the first...and even then, the only thing that will show up on a linear scale will be the peak--
hL=plot(X,Y+[0 400]);
That may be all that is of interest, dunno; we have no idea of the end result wanted/needed. OTOH, if whatever else is in the noise/weeds is of any interest, then instead of adding, you'll need to multiply and use semilogy
figure
hL=semilogy(X,Y.*[1 1000]);
produces:

カテゴリ

質問済み:

2020 年 2 月 22 日

編集済み:

dpb
2020 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by