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개)

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by