Hi!
I need some help on how to recover data from a binary file. I want to store a huge matrix by appending k 1000 x 9000 matrices to a binary file, but I don't know how to recover them in the right order after reading the file using fread and reshape. I want my big matrix to be of size k*1000 x 9000, i.e. the size when concatenating the matrices in the first dimension. Here is what I am doing in principle:
fid = fopen('binFile.bin','a');for n = 1:k data = rand(1000,9000); fwrite(fid,data,'double'); endbigData = fread(fid,[k*1000*9000],'double');bigMatrix = reshape(bigData,[k*1000, 9000]);
Thankful for any pointers to solve this!
Best Answer