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

    %% Check Passivity of Object
% Create a scalar rational function object and check the passivity of the
% object.  Read a Touchstone data file.
ckt = read(rfckt.passive, 'passive.s2p');
%%
% Fit the transfer function into a rational function object.
TF = s2tf(ckt.AnalyzedResult.S_Parameters);
TF_Object = rationalfit(ckt.AnalyzedResult.Freq, TF);
%%
% Check the passivity of the rational function object. 
Is_Passive = ispassive(TF_Object)