把浮点数写入二进制文件 data = 1.2; fileID = fopen('myfile.bin','w'); fwrite(fileID,data,'double'); fclose(fileID);