How to convert binary file to csv file
Mostrar comentarios más antiguos
Dear colleagues, I have binary file. But I do not know how to read and convert to .CSV file. Please help. I attached it for reference. Thanks. https://drive.google.com/open?id=0Bx6bUTVOinyySl9nUnN2TGxxc2c
2 comentarios
KSSV
el 3 de Mzo. de 2017
You must know the format of binary file to read. Do you know the format? Doc fread
Xuan Hiep Dinh
el 5 de Mzo. de 2017
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 3 de Mzo. de 2017
Editada: Walter Roberson
el 3 de Mzo. de 2017
fid = fopen('test2.bin1');
data = fread(fid, '*uint8');
data = reshape(data, 32, []);
imshow(data);
Or possibly
data = reshape(data, 1, []);
imshow(data);
4 comentarios
Xuan Hiep Dinh
el 5 de Mzo. de 2017
Xuan Hiep Dinh
el 5 de Mzo. de 2017
Walter Roberson
el 5 de Mzo. de 2017
fid = fopen('test2.bin1');
temp = fread(fid, [2 inf], 'uint16=>double');
fclose(fid);
data = complex(temp(1,:), temp(2,:));
Note: all of the complex components are 0.
You appear to have pulses of width 63 or (more often) 64, that are placed 125 or 126 apart. So this is basically a square wave with a duty cycle just slightly greater than 1/2
Xuan Hiep Dinh
el 12 de Mzo. de 2017
Categorías
Más información sobre Text Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!