zparameters

Create Z-parameter object

Syntax

  • hz = zparameters(filename) example
  • hz = zparameters(hnet)
  • hz = zparameters(data,freq)
  • hz = zparameters(___,Z0)
  • hz = zparameters(rftbxobj)

Description

example

hz = zparameters(filename) creates a Z-parameter object hz by importing data from the Touchstone file specified by filename.

hz = zparameters(hnet) creates a Z-parameter object from the RF Toolbox™ network parameter object hnet.

hz = zparameters(data,freq) creates a Z-parameter object from the Z-parameter data, data, and frequencies, freq.

hz = zparameters(___,Z0) creates a Z-parameter object using the previously described syntax, with a reference impedance of Z0.

hz = zparameters(rftbxobj) extracts network data from rftbxobj and converts it into z-parameter data.

Examples

Read File as Z-parameters, Extract Z11, Plot Imaginary Part of Z11

Read the file defaultbandpass.s2p as z-parameters.

Z = zparameters('defaultbandpass.s2p')
Z = 

  zparameters: Z-parameters object

       NumPorts: 2
    Frequencies: [1000x1 double]
     Parameters: [2x2x1000 double]

  rfparam(obj,i,j) returns Z-parameter Zij

Extract parameter z11.

z11 = rfparam(Z,1,1);

Plot imaginary part of z11.

  plot(Z.Frequencies, imag(z11))

Input Arguments

expand all

data — Z-parameter dataarray of complex numbers

Z-parameter data, specified as an array of complex numbers, of size N-by-N-by-K. The function uses this input argument to set the value of the Parameters property of hz.

filename — Touchstone data file that contains network parameter datastring

Touchstone data file, specified as a string. filename can be the name of a file on the MATLAB® path or the full path to a file.

Example: hz = zparameters('defaultbandpass.s2p');

freq — Z-parameter frequenciesvector of positive numbers

Z-parameter frequencies, specified as a vector of positive real numbers, sorted from smallest to largest. The function uses this input argument to set the value of the Frequencies property of hz.

hnet — Network parameter datascalar handle

Network parameter data, specified as a scalar handle. If hnet is a Z-parameter object, then hz is a deep copy of hnet. Otherwise, the function performs a network parameter conversion to create hz. When converting network parameters, the same restrictions apply as those for RF Toolbox network parameter data conversion functions:

  • ABCD parameter objects support 2N-port data.

  • Hybrid-g parameter objects support 2-port data.

  • Hybrid parameter objects support 2-port data.

  • S-parameter objects support N-port data.

  • Y-parameter objects support N-port data.

  • Z-parameter objects support N-port data.

rftbxobj — network objectscalar

Network object, specified as scalar handle. Specify rftbxobj as one of the following types: rfdata.data, rfdata.network, and any analyzed rfckt type.

Output Arguments

expand all

hz — Z-parameter objectscalar handle

Z-parameter data, returned as a scalar handle. disp(hz) returns the properties of the object:

  • NumPorts — Number of ports, specified as an integer. The function calculates this value automatically when you create the object.

  • Frequencies — Z-parameter frequencies, specified as a K-by-1 vector of positive real numbers sorted from smallest to largest. The function sets this property from the filename or freq input arguments.

  • Parameters — Z-parameter data, specified as an N-by-N-by-K array of complex numbers. The function sets this property from the filename or data input arguments.

Was this topic helpful?