Labrador/Old Matlab Interface/plotmem.m

21 lines
342 B
Mathematica
Raw Normal View History

2016-09-07 07:36:43 +01:00
fid = fopen('C:\users\esposch\documents\output.hex');
buffer = 0;
hexarray = [];
while (buffer ~= -1)
buffer = fgetl(fid);
hexarray = [hexarray buffer(10:end-2)];
end
uintarray = [];
for n=1:2:length(hexarray)
uintarray = [uintarray hex2dec(hexarray([n n+1]))];
end
typecast(uintarray, 'int8')
plot(uintarray);
fclose(fid);