I'm trying to Plot Pt against length , it's not plotting
2 ビュー (過去 30 日間)
古いコメントを表示
close all;
Sr=-45;
Ltx=8.52;
Lrx=5.48;
Ma=8;
L=50;
f=0.5;
j=0.12;
n=(L/2)-1;
Pt= Sr + Ltx + f*L + n*j + Lrx + Ma;
OLR= 10e3:1:120e3; % Optical length range (m)
plot(OLR,Pt)
xlabel('C/N ratio in dB---->');
ylabel('Transmitted Power Pt in Watt----->');
title('C/N Versus Pt');
grid on;
0 件のコメント
採用された回答
Walter Roberson
2022 年 10 月 16 日
Pt= Sr + Ltx + f*L + n*j + Lrx + Ma;
all of the values are scalars. Your computation is independent of OLR
3 件のコメント
Walter Roberson
2022 年 10 月 16 日
define OLR first then
Pt= Sr + Ltx + f*L + n*j + Lrx + Ma + 0*OLR;
This will have the effect of replicating the value the same size as OLR
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Optics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!