MATLAB: How to use the SETOP function in RF Toolbox 2.4 (R2008b)

RF Toolbox

The documentation states that the SETOP function changes the operating conditions of a circuit or data object to those specified by the condition/value pairs. However, it does not give an example on how to use this function.

Best Answer

The condition/value pairs are defined in the .p2d or .s2d files. Some example .s2d files should be located in the $MATLABROOT/toolbox/rf/rfdemos directory. For instance, the default.s2d file has a condition called "Bias" defined.
Execute the following commands at the MATLAB prompt to create the data object and view the possible values:
a = read(rfckt.amplifier,'default.s2d');
setop(a)
To define additional condition/value pairs in the .p2d or .s2d file, simply edit the file and add "VAR $condition=$value" entries.