Plot an equation: variable inputs

2 ビュー (過去 30 日間)
STP
STP 2020 年 9 月 4 日
回答済み: Alan Stevens 2020 年 9 月 4 日
I fail to get this plot via this equation on matlab, although mathematically I get it right.
T = 0.3 dB
  1 件のコメント
madhan ravi
madhan ravi 2020 年 9 月 4 日
? MATLAB Code

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

回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 9 月 4 日
Just a slight modification of the routine in your previous post is needed!
Cfn = @(CdB) 10.^(CdB/20);
Mfn = @(C,T) (C./(1-T.*(1 - C.^2).^0.5)).^2;
CdB = [-10, -12]; %CdB = 4:4:16;
C = Cfn(CdB);
T = 10^-5:10^-3:1;
AdB = Afn(T);
str = [];
for j = 1:numel(CdB)
for k = 1:numel(T)
M(k) = Mfn(C(j),T(k));
end
loglog(AdB,M)
hold on
str = [str; sprintf('C = %4d', CdB(j)) ];
end
axis([0.1 1 1 100])
grid
xlabel('A [dB]'), ylabel('M')
legend(str)
(Unfortunately, the definition of Cfn in the previous post had a negative sign that shouldn't have been there!).

カテゴリ

Help Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by