Hi, I've read the post "Read and write from/to a binary file in Matlab" but I still have doubts. I have a binary file of long double values created with fwrite in C and in Matlab I'm using
fid = fopen('vz3.dat', 'r')
mydata = fread(fid, 'double')
where vz3.dat is my file. But I'm getting garbage values in Matlab. According to
[cinfo, maxsize, ordering] = computer
in Matlab, my computer is a little-endian system (byte ordering system). Any suggestions?
By the way, does a binary file necessarily have to end in .bin .I'm using the .dat extension. Is it ok to do so?
Thanks a lot