RFtoolbox problem to save files that was changed in frequncies
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Ganapathi Subramanian R
on 9 May 2024
Edited: Ganapathi Subramanian R
on 9 May 2024
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
0 Comments
See Also
Categories
Find more on Visualization and Data Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!