sweeplot.m

来自「MATLAB及在电子信息课程中的应用天线模型」· M 代码 · 共 36 行

M
36
字号
%SWEEPLOT Plots the input impedance (resistance/reactance)
%   and reflection coefficient as functions of frequency
%
%   Uses current.mat as an input to load the impedance data
%   Run this script after RWG31
%
%   Copyright 2002 AEMM. Revision 2002/03/26 
%   Chapter 8

clear all
load('current.mat');

%Plot impedance (real+imag)
a=figure
plot(f, real(Impedance));
xlabel ('Frequency, Hz')
ylabel('Input  resistance, Ohm')
axis([0 5000e6 -500 500])
grid on
b=figure
plot(f, imag(Impedance));
xlabel ('Frequency, Hz')
ylabel('Input  reactance, Ohm')
axis([0 5000e6 -500 500])
grid on

%Plot reflection coefficient(return loss) versus 50 Ohm
c=figure
Gamma=(Impedance-50)./(Impedance+50);
Out=20*log10(abs(Gamma));
plot(f, Out);
xlabel ('Frequency, Hz')
ylabel('Reflection Coefficient, dB')
grid on

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?