Single type Binary reading

Hi, I am a new to Julia, and I need some help.

% Load data in Matlab
fileID = fopen('./data_6000x3199.bin');
Data = fread(fileID,[6000,3199],'single');

How can I convert this simple code from Matlab to Julia?

I don’t know the .bin format — if you can describe that, it is more likely that you will get help.

If it is just a bunch of Float32s, it may be something as simple as

data = zeros(Float32, 6000, 3199)
read!("data_6000x3199.bin", data)
1 Like

For the record, this is a cross-post from StackOverflow (where the question was already answered):

1 Like