poster
2019-12-14, 20:13
如何确定它是大端文件还是小端文件?我只是尝试用matlab编写一个big-endian文件,但可能没有用。现在,我想了解是否有可能了解它的类型。有什么建议吗?
回答:
使用FOPEN (http://www.mathworks.com/help/techdoc/ref/fopen.html) :
fileID = fopen(fileName) [filename, permission, machineformat] = fopen(fileID) 第三个输出是machineformat ,它告诉您是大字节序( 'b' )还是小字节序( 'l' )。
更多&回答... (https://stackoverflow.com/questions/5187469)
回答:
使用FOPEN (http://www.mathworks.com/help/techdoc/ref/fopen.html) :
fileID = fopen(fileName) [filename, permission, machineformat] = fopen(fileID) 第三个输出是machineformat ,它告诉您是大字节序( 'b' )还是小字节序( 'l' )。
更多&回答... (https://stackoverflow.com/questions/5187469)