Having trouble loading hex file and getting required data.

1 回表示 (過去 30 日間)
Prabhav
Prabhav 2013 年 11 月 3 日
編集済み: dpb 2013 年 11 月 4 日
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
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!

Translated by