Save S-parameter in matlab

103 ビュー (過去 30 日間)
Vinoth
Vinoth 2011 年 12 月 7 日
回答済み: Mark 2022 年 6 月 8 日
Hello,
I want to create S-parameter(.s2p) file in MATLAB.I have following information stored in matlab.
Freq--stored as 2650*1 double and SParameter--stored as 2650*4 complex double
--vinoth
  1 件のコメント
Vinoth
Vinoth 2011 年 12 月 7 日
.s2p should be in TOUCHSTONE format

サインインしてコメントする。

採用された回答

Mark
Mark 2022 年 6 月 8 日
If you have freq and data variables of the appropriate size, use the rfwrite function in RF Toolbox:
>> size(freq)
ans =
202 1
>> size(data)
ans =
2 2 202
>> rfwrite(data,freq,'myfile.s2p')
alternatively you can use rfwrite on sparameters objects:
>> S = sparameters(data,freq)
S =
sparameters: S-parameters object
NumPorts: 2
Frequencies: [202×1 double]
Parameters: [2×2×202 double]
Impedance: 50
rfparam(obj,i,j) returns S-parameter Sij
>> rfwrite(S,'myfile2.s2p')

その他の回答 (1 件)

Abhishek Gupte
Abhishek Gupte 2011 年 12 月 7 日
1. You need to create an RF Data Object from your available data. Doc page is here;
2. Ensure that the dimensions of each of the properties of the RF Data Object match the standard dimensions. As a reference, use this:
orig_data=read(rfdata.data,'default.s2p')
3. Use the WRITE function as described here.
4. The References for the WRITE function as mentioned in the documentation page is EIA/IBIS Open Forum, "Touchstone File Format Specification," Rev. 1.1, 2002

カテゴリ

Help Center および File ExchangeVisualization and Data Export についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by