Answers:
read!
将用从二进制文件读取的数据填充数组:
julia> x # original array
2×2 Array{Float32,2}:
1.0 3.0
2.0 4.0
julia> write("test.bin", x) # write to binary file
16
julia> y = Array{Float32}(undef, 2, 2); # create a container for reading data
julia> read!("test.bin", y) # read data
2×2 Array{Float32,2}:
1.0 3.0
2.0 4.0
'single'
表示单精度浮点,用Float32
Julia 表示。您的示例MATLAB代码将转换为以下Julia代码:
data = Array{Float32}(undef, 6000, 3199)
read!("data_6000x3199.bin", data)