Message Boards Message Boards

[✓] Open a Bin file

Posted 5 years ago

Dear All, I am new to Mathematica. I just downloaded the trial version just to understand if it can be good for me. I normally work around numerical data and i need to read and work with a BIN file. The code that I use in Octave to open the file is:

fid=fopen(filename);

A=fread(fid,'uint16');

fclose(fid);

How can I open this file in Mathematica? Thank you very much and best regards.

Burno

POSTED BY: Bruno Vusini
2 Replies
Posted 5 years ago

Hi Rohit. Thank you very much for your reply! I tried and it works!

POSTED BY: Bruno Vusini
Posted 5 years ago

Hi Bruno,

You can try BinaryReadList

data = BinaryReadList[filename, "UnsignedInteger16"];
Close[filename];
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract