I want to write some data to a binary file in single precision. The data is originally in double precision. Is there any difference between converting the data to single by calling the single command before fwrite and just letting Matlab do the conversion in the fwrite call?
Case 1
data1 % double precision
fwrite(fid,data1,'single');
Case 2
data2=single(data1);
fwrite(fid,data2,'single');
In the 2nd case, is Matlab doing any modifications to data2 before writing it since it is already in single format ? Will there be any difference in data written to the two files ?
