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

    %% Create and Extract S-parameters of Resistor
% Create an resistor object and extract the s-parameters of this resistor. 

% Copyright 2015 The MathWorks, Inc.


hR = resistor(50,'R50');
hckt = circuit('example2');
add(hckt,[1 2],hR)
setports (hckt, [1 0],[2 0])
freq = linspace (1e3,2e3,100);
S = sparameters(hckt,freq);
disp(S)