We present the ‘SDF Importer’, a package developed to enable reading of HP/Agilent/Keysight Standard Data Format (SDF) files within MATLAB and Octave.
We provide a brief introduction to the package’s functions, a description of the structure of the extracted data, and step by step instruction on extracting and displaying single-trace and multi-trace datasets. Additionally an assessment of the importer against the Standard Data Format Utilities supplied with original HP equipment is performed.
Justin Dinale (2020). SDF Importer (https://www.mathworks.com/matlabcentral/fileexchange/67513-sdf-importer), MATLAB Central File Exchange. Retrieved .
I have made changes in v1.0.4 which should address the error you experienced. It was caused by an error in the way the arrays were reshaped just prior to line 195. Let me know how it goes.
HP 89441A time capture file doesn't work with this SDF importer:
Error using eval
Undefined function or variable 'uint40'.
Error in SDF_import>SDF_uintX_vector (line 595)
eval(['retval = uint' num2str(bytes * 8) '(0);']);
Error in SDF_import>SDF_float_vector (line 865)
retval = double(typecast(SDF_uintX_vector(arg),'single'));
Error in SDF_import (line 195)
eval(['data.SDF_SCAN_STRUCT.scanVar(n,:) = SDF_' data.SDF_SCAN_STRUCT.zz_scanVar_type ...
Please be aware that for some reason File Exchange is not uploading the new version of SDF_Import.
I have been in contact with Mathworks, and they are investigating the problem.
If you email me a sample multi-channel measurement file from the HP35670a Dynamic Signal Analyzer, I'll have a look at it. Contact details functions comments.
It does not appear to work for multi-channel measurements with data from an HP35670a Dynamic Signal Analyzer. I get the following error.
Error in SDF_import>SDF_Multi_ChannelY (line 1090)
tmp = data.SDF_YDATA_HDR.zz_raw_data(y_idx+1:y_idx+numBytes);
Error in SDF_import>SDF_YDATA_Process (line 425)
[data,y_idx] = SDF_Multi_ChannelY(data,n_ns,y_idx); % For some reason 'data' was 'tmp'
Error in SDF_import (line 237)
data = SDF_YDATA_Process(data,file_raw);
Single channel measurements work just fine.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!