RFtoolbox problem to save files that was changed in frequncies

1 vue (au cours des 30 derniers jours)
Roee
Roee le 2 Mai 2024
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

Réponses (1)

Ganapathi Subramanian R
Ganapathi Subramanian R le 9 Mai 2024
Modifié(e) : Ganapathi Subramanian R le 9 Mai 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

Catégories

En savoir plus sur Visualization and Data Export dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by