Generate SPICE file from
Generate SPICE File of 2-by-2 S-parameters
Read a file named
passive.s2p and fit the 2-by-2 S-parameters. Generate a SPICE file of these S-parameters.
S = sparameters('passive.s2p'); fit = rationalfit(S); generateSPICE(fit,'passive.ckt')
The circuit is saved in your current folder.
filename — Name of file for SPICE subcircuit
string | character vector
Name of file in which to store the SPICE subcircuit, specified as a string or a character vector. The SPICE subcircuit is constructed out of passive resistor (R) and capacitor (C) SPICE elements and controlled-source SPICE elements voltage-controlled voltage source (E), current-controlled current source (F), voltage-controlled current source (G), and current-controlled voltage source (H).
zref — Reference impedance
50 (default) | real scalar
Reference impedance, specified as a real scalar in ohms.
Introduced in R2019b