
How to plot this equation and get this curve??
2 ビュー (過去 30 日間)
古いコメントを表示
Here is the equation :

T = 10.^(-A/20)
The plot of A vs C is :

My code so far:
N = 15;
C = linspace(0, 35, N);
A = linspace(0, 10, N);
T = 10.^(-A./20);
X = sqrt(1-C.^2);
Y = 1-T.*X;
PG = (C/Y).^2;
for a1 = 1:numel(C)
for a2 = 1:numel(A)
X = sqrt(1-C.^2);
Y = 1-T.*X;
PG = (C/Y).^2;
plot(C,A);
xlabel('C (dB)');
ylabel('A (dB)');
title(sprintf('Power multiplication'))
end
end
0 件のコメント
回答 (1 件)
Alan Stevens
2020 年 8 月 31 日
編集済み: Alan Stevens
2020 年 9 月 1 日
The following plots the curves:
Cfn = @(CdB) 10.^(-CdB/20);
Tfn = @(C,M) (1 - C./M.^0.5)./(1 - C.^2).^0.5;
Afn = @(T) -20*log10(T);
Mvals = [2, 5:5:20, 30, 40, 50];
CdB = 1:0.05:24;
C = Cfn(CdB);
str = [];
for j = 1:numel(Mvals)
M = Mvals(j);
for k = 1:numel(CdB)
T = Tfn(C(k),M);
A(k) = Afn(T);
end
A(A<0)=NaN;
semilogy(CdB,A)
hold on
str = [str;sprintf('%4d',M)];
end
axis([0 28 0.01 10] )
grid
xlabel('C [dB]'), ylabel('A [dB]')
legend(str)

2 件のコメント
Alan Stevens
2020 年 9 月 2 日
編集済み: Alan Stevens
2020 年 9 月 2 日
As follows:
Mfn = @(C,T) (C./(1-T.*(1 - C.^2).^0.5)).^2;
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
semilogx(AdB,M)
hold on
str = [str; sprintf('C = %4d', CdB(j)) ];
end
grid
xlabel('A [dB]'), ylabel('M')
legend(str)

Or with CdB = 10 and 12:

Note that this matches your last image only if the C values are positive, rather than the negative values on the image.
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
