Read in XMLdig Waveform
5 views (last 30 days)
Show older comments
Hey, I want to read in a waveform to MatLab which has the XMLDig-format. The waveform was recorded with a Lecroy Oscilloscope. I am able to read the data into Matlab and encode it (base64 encoding).
fseek(fid, 1387, 'bof'); %beginning of binary data
decimal=fread(fid,4192906,'schar'); %size of data
STR = string(decimal);
txt = (char((decimal)));
decoded = (matlab.net.base64decode(txt));
decodedbin = dec2bin(decoded,8); %convert to bin with 8 digits
This code works for my file, but i dont know how to intepret the data. If someone has had the same problem and was able to solve it and plot the waveform right i would be very thankful for help.
Tom
3 Comments
Walter Roberson
on 5 Oct 2022
The only way I can see what is described working is if there is information in the header before the base64 information that tells you which array is encoded and what the expected sizes are. If there is, I think it might be possible to decode into arrays. However according to the documentation, the data arrays have to be analyzed to produce waveforms; the process of doing that is not clear from the description.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!