Get frequency from sparameter object
17 次查看(过去 30 天)
显示 更早的评论
I have imported a touchstone file (s2p) to an sparameter object using sparameters function in RF Toolbox:
Example_s_param=sparameters('Example.s2p');
I want to get the frequency vector from Example_s_param. I can see it when using disp(Example_s_param) - then it returns:
NumPorts: 2
Frequencies: [1001×1 double]
Parameters: [2×2×1001 double]
Impedance: 50
I want to save the "Frequncies" in a new vector I can use to plot stuff. Somehow I cannot figure out how to do this.
2 个评论
采纳的回答
Payas Bahade
2020-3-17
Hi Frederikke,
‘Example_s_param’ is a structure with 4 fields viz. NumPorts, Frequencies, Parameters and Impedance. To access values in these fields, dot notation is used. For example:
S = sparameters('default.s2p');
Freq = S.Frequencies; % Storing 'Frequencies' field values from Structure 'S' into variable Freq
You can use following code to store frequencies as new vector:
Freq = Example_s_param.Frequencies;
Hope this helps!
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Network Parameters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!