www.gusucode.com > rf 案例源码程序 matlab代码 > rf/BuildAndSimulateANetworkExample.m

    %% Build and Simulate a Network
% 
%% Create rf components
%

% Copyright 2015 The MathWorks, Inc.

FirstCkt = rfckt.txline;
SecondCkt = rfckt.amplifier;
ThirdCkt = rfckt.txline;

%% Cacade the three circuits
%
CascadedCkt = rfckt.cascade('Ckts',{FirstCkt,SecondCkt,...
           ThirdCkt});

%% Define the range of frequencies over which to analyze the cascaded circuit 
%
f = (1.0e9:1e7:2.9e9);
analyze(CascadedCkt,f);

%% Command to plot the S11 and S22 parameters of the cascaded amplifier network
%
figure
lineseries2 = smith(CascadedCkt,'S11','S22','z');
lineseries2(1).LineStyle ='-';
lineseries2(1).LineWidth =1;
lineseries2(2).LineStyle = ':';
lineseries2(2).LineWidth = 1;
legend show

%% Command to plot the S21 parameter of the cascaded amplifier network
%
figure
plot(CascadedCkt,'S21','dB')
legend show

%% Command to create a budget plot of the S21 parameter and the noise figure of the amplifier network
%
figure
plot(CascadedCkt,'budget', 'S21','NF')
legend show