MATLAB Answers

Plot magnitude of reflection coefficient in linear and db scale, vswr

조회 수: 8(최근 30일)
Nicholas Barker
Nicholas Barker 25 Feb 2020
댓글: Star Strider 28 Feb 2020 12:57
Good afternoon,
I have a hw problem that requires me to plot the reflection coefficent in linear, db scale,and vswr so far I have these lines of code.
C=8.34E-12;
L=15E-9;
zo=50;
zin=50+((1/1i*C)+1i*L);
f=linspace(200E6,1E9);
w=2*pi*f;
gamma=((zin-zo)./(zin+zo));
agamma=abs(gamma);
db=10*log10(abs(agamma)^2);
vswr=(1+agamma)/(1-agamma);
plot(db,f)
plot(w, vswr)
plot(w,gamma)
I have errors and its saying imaginary parts are ignored.

  댓글 수: 0

로그인 to comment.

채택된 답변

Star Strider
Star Strider 25 Feb 2020
편집: Star Strider 25 Feb 2020
Use the linspace function to create the ‘f’ vector:
C=8.34E-12;
L=15E-9;
zo=50;
zin=50+((1/1i*C)+1i*L);
f=linspace(200E6,1E9);
gamma=((zin-zo)./(zin+zo));
agamma=abs(gamma);
w=2*pi*f;
figure
plot(f,agamma)
I suspect that ‘zin’ should instead be:
zin=50+(1./(1i*C)+1i*L);
and likely also needs to be a function of ‘w’. I leave that to you.
(When I made the necessary other corrections and ran your code, there appears to be a match at 450 MHz.)
EDIT — (20 Feb 2020 at 20:36)
The imaginary parts are ignored in the plot if you plot ‘gamma’. If you instead plot ‘agamma’ there is no problem.
For that reason, also use ‘agamma’ when you calculate the values in dB.

  댓글 수: 2

Nicholas Barker
Nicholas Barker 28 Feb 2020 12:55
Much appreciated, I got all graphs figured out and found resonant frequency

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by