RF Budget analyzer S2P file error: Index in position 1 exceeds array bounds (must not exceed 1)
2 次查看(过去 30 天)
显示 更早的评论
I am using the following code to generate the S-parameters of a dipole antenna and save in a .S2P file. I then want to use that file in the RF Budget analyzer for my Sparams block. However, when I load in the file I get the error "Index in position 1 exceeds array bounds (must not exceed 1)". Can anyone please help with this?
% Create a dipole antenna
% Generated by MATLAB(R) 9.7 and Antenna Toolbox 4.1.
% Generated on: 10-Mar-2020 17:55:46
%% Antenna Properties
% Design antenna at frequency 5900000000Hz
antennaObject = design(dipole,5900000000);
%% Antenna Analysis
% Define plot frequency
plotFrequency = 5900000000;
% Define frequency range
freqRange = (5310:59:6490) * 1e6;
% show for dipole
% s11 for dipole
figure;
s = sparameters(antennaObject, freqRange);
freq = s.Frequencies;
sparameters= s.Parameters;
rfwrite(sparameters,freq,'sparam.s2p')
clear;
1 个评论
Sriram Tadavarty
2020-3-12
Hi Ben,
I see that above is working as expected without any error. Can you once ensure that you are trying to save from the folder that has permissions? Also, you could even try alternate interface rfwrite(s,'sparam.s2p').
Let me know, if any of the two works.
Regards,
Sriram
回答(1 个)
Sourabh Joshi
2021-8-5
Hello Ben,
Since the antenna is a One-Port device , the sparameters it generates are 1 port sparameters which are not accepted in the Budget Analyser App. It only accepts the two port networks. But if you want to use the antenna block in the budget analyser, then we have added this functionality in 2021a version and the documentation page for this is given below.
Using this block, you can design an antenna in the antenna designer app and import that into the RF Budget Analyser app.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!