ispassive

Check passivity of N-port S-parameters

Syntax

[flag,index_non_passive] = ispassive(s_params)
[flag,index_non_passive] = ispassive(hs)

Description

[flag,index_non_passive] = ispassive(s_params) checks the passivity of sparams, an array of N-port S-parameters. If all the S-parameters are passive, ispassive sets flag equal to 1 (true). Otherwise, flag is equal to 0 (false). index_non_passive is a vector of indices corresponding to the non-passive S-parameters in sparams. If flag is true, index_non_passive is empty.

[flag,index_non_passive] = ispassive(hs) checks the passivity of the network represented by the S-parameter object hs.

Examples

Check the passivity of an S-parameters array; separate non-passive S-parameters into a new array:

%Read a Touchstone data file
ckt = read(rfckt.passive,'passive.s2p')
%Check the passivity
data = ckt.AnalyzedResult
[result,index] = ispassive(data.S_Parameters);
%Get the non-passive S-parameters
if ~(result)
     AllNonPassiveSparams = data.S_Parameters(:,:,index);
     FirstNonPassiveSparams = AllNonPassiveSparams(:,:,1)
end
Was this topic helpful?