Function without RF Toolbox

8 views (last 30 days)
Askar Ali
Askar Ali on 7 Feb 2020
Answered: Walter Roberson on 7 Feb 2020
Dear All,
I got a code from online for VNA calibration but unfortunately I dont have Rf toolbox in MATLAB but in the code , there exists a rfdata command.Can anyone pls tell me how to write a function without calling rfdata command?
Attached the code with rfdata object.
for i=1:NOF
S_obj=read(rfdata.data, [DUTDir,filelist{i}]);
DUT=S_obj.S_Parameters(:,:,1:handles.DROP:end);
Freq=S_obj.Freq(1:handles.DROP:end);
ns=numel(Freq);
for i=1:NOL
SL_obj=read(rfdata.data, [handles.CalKitDir,LineFile{i}]);
SL{i}=SL_obj.S_Parameters(:,:,1:handles.DROP:end);
if (i==1)
Freq=SL_obj.Freq(1:handles.DROP:end);
end
AppendMsg(handles.DispWinObj,['CalKit ', LineFile{i},' loaded.'])
end
Thanks in advance,
Askar

Answers (1)

Walter Roberson
Walter Roberson on 7 Feb 2020
The code you are using expects rfdata objects in three different contexts, and calls upon rfdata methods and passes rfdata objects to other functions that expect it to be rfdata. You cannot simply modify one call: you would have to reimplement functionality and rewrite several routines.
The MATLAB license would not permit us to deliberately reimplement the rfdata objects just to avoid paying for the toolbox.
I would recommend that you obtain the rf toolbox that you need to run the code.

Community Treasure Hunt

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

Start Hunting!