RFtoolbox problem to save files that was changed in frequncies

3 次查看(过去 30 天)
Hi,
I am trying to open S-parameter and save it in different frequencies:
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: OpenFileButton
function pushed(app, event)
global myhs
global myhs1
[file,path,indx] = uigetfile({'*.s*p','*.S*P*'})
filename= [path file];
myhs = sparameters(filename);
myhs1=myhs;
msgbox('File loaded ok', filename);
Lastfreq=myhs.Frequencies(end);
myfreq=linspace(0,Lastfreq,10);
myfname = 'test1.s32p'
rfwrite(myhs, myfreq, myfname) -> this fail with error why ??
Error using rfwrite
No value was given for 'test1.s32p'. Name-value pair arguments require a name followed by a value.
I am opening S32P file, so why does this fail ?
Thanks,
Roee

回答(1 个)

Ganapathi Subramanian R
编辑:Ganapathi Subramanian R 2024-5-9
Hi Roee,
I understand that you are facing an issue while saving S-parameter into different frequency as touchstone file using 'rfwrite' function.
The input argument for 'rfwrite' function are data (Number of ports and frequencies), freq (Values of frequencies) and filename of the touchstone file. Please modify your 'rfwrite' function line as
>> rfwrite(myhs.Parameters,myfreq,'test1.s32p')
Ensure that the number of ports of the S-parameter file which you read and the extension of new touchstone file are same.
For example, if the numer of ports of the S-parameter file read is 'n', then the filename of new touchstone file should be 'test1.snp'.
For further information regarding 'rfwrite' function, please refer the below documentation link.
I hope this helps.
Thanks

类别

Help CenterFile Exchange 中查找有关 Visualization and Data Export 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by