Products & Services Solutions Academia Support User Community Company

Learn more about RF Toolbox   

Exporting Component Data to a File

Available Export Formats

RF Toolbox software lets you export data from any rfckt object or from an rfdata.data object to industry-standard data files and MathWorks AMP files. This export capability lets you store data for use in other simulations.

You can export data to the following file formats:

How to Export Object Data

To export data from a circuit or data object, use a write command of the form

status = write(obj,'filename');

where

For example,

status=write(rfckt.amplifier, 'myamp.amp');

exports data from an rfckt.amplifier object to the file myamp.amp.

Example — Exporting Object Data

In this example, use the toolbox to create a vector of S-parameter data, store it in an rfdata.data object, and export it to a Touchstone file.

At the MATLAB prompt:

  1. Type the following to create a vector, s_vec, of S-parameter values at three frequency values:

    s_vec(:,:,1) = ...
        [-0.724725-0.481324i, -0.685727+1.782660i; ...
          0.000000+0.000000i, -0.074122-0.321568i];
    s_vec(:,:,2) = ...
        [-0.731774-0.471453i, -0.655990+1.798041i; ...
          0.001399+0.000463i, -0.076091-0.319025i];
    s_vec(:,:,3) = ...
        [-0.738760-0.461585i, -0.626185+1.813092i; ...
          0.002733+0.000887i, -0.077999-0.316488i];
  2. Type the following to create an rfdata.data object called txdata with the default property values:

    txdata = rfdata.data;
  3. Type the following to set the S-parameter values of txdata to the values you specified in s_vec:

    txdata.S_Parameters = s_vec;
  4. Type the following to set the frequency values of txdata to [1e9 2e9 3e9]:

    txdata.Freq=1e9*[1 2 3];
  5. Type the following to export the data in txdata to a Touchstone file called test.s2p:

    write(txdata,'test')

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS