Code covered by the BSD License
-
s_extract(file_name,fmin,fmax...
This converts the measurement data from its dB - Phase format to a
-
show8505a
Copywrite 2002-2010 The MathWorks, Inc.
-
showssresults
Copywrite 2002-2010 The MathWorks, Inc.
-
simple_smith(In1,In2,Zo,Pos)
function hout = simple_smith(In1,In2,Zo,Pos)
-
zmatch_4(r1_v,r2_v,Q,f)
-
Verify_Amp.m
-
flowgraph_1.m
-
make_model.m
-
match_net.m
-
run_spar.m
-
s_plus_match_2.m
-
sp2sd.m
-
sp_ex1.m
-
sparam_1
-
sparam_2
-
View all files
from
Using S-Parameters in MATLAB & Simulink
by Dick Benson
Example of rf amplifier design using S parameters in both MATLAB and Simulink.
|
| s_extract(file_name,fmin,fmax,df)
|
function [sout,fout] = s_extract(file_name,fmin,fmax,df)
% This converts the measurement data from its dB - Phase format to a
% complex (x + j*y) format.
% Copywrite 2002-2010 The MathWorks, Inc.
d=load(file_name,'-mat');
f=d.data.s(1,1).freq;
n = sum(fmin>=f); % low freq index
m = sum(f<fmax); % high freq index
inc = round(df/(f(2)-f(1)));
if inc >0
fout = f(n:inc:m);
v = n:inc:m;
else
fout =f(n);
v = n;
end;
for k =1:2
for l=1:2
[x,y] = dbphase2xy(d.data.s(k,l).mag(v),d.data.s(k,l).ph(v));
sout(k,l).s= x+j*y;
end;
end;
|
|
Contact us