I can read UINT64 data into MATLAB as DOUBLE, but I want to convert it to be UINT64 in the FREAD command by using *. For example, I try the following code:
a=[1 2 3 4];fid = fopen('test.bin','w');fwrite(fid,a,'uint64');fclose(fid);fid = fopen('test.bin','r');b = fread(fid,'*uint64');fclose(fid);
When I run the code, MATLAB returns the following error:
??? Error using ==> fread Invalid precision.
If I replace UINT64 with UINT32, the code runs without error.
Best Answer