how to use legend syntax properly

1 回表示 (過去 30 日間)
Dipsikha Roy
Dipsikha Roy 2021 年 3 月 3 日
コメント済み: Cris LaPierre 2021 年 3 月 3 日
recvd_signal_paralleled(1:cp_len,:)=[];
R1=recvd_signal_paralleled(:,1);
R2=recvd_signal_paralleled(:,2);
R3=recvd_signal_paralleled(:,3);
R4=recvd_signal_paralleled(:,4);
R5=recvd_signal_paralleled(:,5);
R6=recvd_signal_paralleled(:,6);
R7=recvd_signal_paralleled(:,7);
R8=recvd_signal_paralleled(:,8);
figure(15),plot((imag(R1)),'r'),subplot(8,1,1),plot(real(R1),'r'),
title('Cyclic prefix removed from the eight sub-carriers')
subplot(8,1,2),plot(real(R2),'y')
subplot(8,1,3),plot(real(R3),'g')
subplot(8,1,4),plot(real(R4),'b')
subplot(8,1,5),plot(real(R5),'k')
subplot(8,1,6),plot(real(R6),'c')
subplot(8,1,7),plot(real(R7),'m')
subplot(8,1,8),plot(real(R8),'b')
legend({'x axis-Freq','y axis-amplitude'},'Location','bestoutside','FontSize',12,'TextColor','blue')
Graph is like
only y axis legend is showing
I want to show x axis freq and yaxis amplitude
What Changes need to be done?Please help

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 3 月 3 日
編集済み: Cris LaPierre 2021 年 3 月 3 日
I think you might not understand what a legend is. Have a look at the documentation.
It sounds like you want xlabel and ylabel.
Note that xlable, ylabel, title, and legend are properties of a single plot. You have 8 plots. Since you call legend at the end, it adds the legend to the last plot created.
  2 件のコメント
Dipsikha Roy
Dipsikha Roy 2021 年 3 月 3 日
Can you suggest me how can i say in this graph in one place that xlabel is time and ylabel is amplitude?
Cris LaPierre
Cris LaPierre 2021 年 3 月 3 日
plot(rand(1,10),'b')
xlabel('Time')
ylabel('Amplitude')

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by