Having trouble loading hex file and getting required data.
1 次查看(过去 30 天)
显示 更早的评论
error loading the hex file and then search for A55A and another A55A after 17 bytes then plot the 3rd set of decimal equivalent data after A55A, in the first line it is 03BD for the second it is 03C5 for the whole file. and the plot should be sinusoidal.
1 个评论
dpb
2013-11-4
编辑:dpb
2013-11-4
Need some more clarification...
>> d=textread('sin.txt','%c')';
>> length(d)
ans =
420484
>> ix=strfind(d,'A55A');
>> length(ix)
ans =
12368
>> ix(1:5)
ans =
1 35 69 103 137
>>
There's an 'A55A' repeated every 34th element--is each a marker for a channel or what? If the data are 4-bytes then it's not a divisible-by-four length so is it a signed 2-byte word?
>> d=d(1:420478); % uneven number records in posting fixup...
>> d=reshape(d,34,[])';
>> d(1:4,:)
ans =
A55A020103BD03FF00440039002500210F
A55A020203C503FF00440039002500210F
A55A020303C703FF00440039002500210F
A55A020403C303FF00450039002500210F
>>
OK, now what is wanted to be read and how to interpret?
回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!