Having trouble loading hex file and getting required data.

1 visualización (últimos 30 días)
Prabhav
Prabhav el 3 de Nov. de 2013
Editada: dpb el 4 de Nov. de 2013
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 comentario
dpb
dpb el 4 de Nov. de 2013
Editada: dpb el 4 de Nov. de 2013
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?

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by