Normalize values in a plot

27 ビュー (過去 30 日間)
Miguel Albuquerque
Miguel Albuquerque 2022 年 7 月 11 日
コメント済み: Miguel Albuquerque 2022 年 7 月 12 日
Hey guys, thanks in advance,
I have this graph:
And I wish to normalize y axis , saying that maximum is 0dB. Im normalizing it like this:
maxval=max(X_QPSK_cut);
X_QPSK_cut=X_QPSK_cut/maxval;
fig=figure;
hold on
set(fig,'color','white');
plot(freq_XQPSK_cut,20*log10(X_QPSK_cut),'b','linewidth',2);
xlabel('Frequency [Hz]');
ylabel('QPSK Spectrum [dB]');
set(gca,'fontsize',fontsize);
grid on;
hold off
Is there a way of normalize the y axis , saying that max val is 0, because, if I put 0 it will say that vector is infinit, and that is true,
Thanks,
  4 件のコメント
dpb
dpb 2022 年 7 月 12 日
The above plot doesn't seem to represent the code (or vice versa)....if you actually normalized as the code says, the max cannot be -105 dB or whatever the max actually is on the plot.
Something's not kosher -- attach the data file as .mat file.
Miguel Albuquerque
Miguel Albuquerque 2022 年 7 月 12 日
Thanks dpb, I ve already solved it, I normalized with the max value of the plot, the plot in the figure, increased 110 dB.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by