Does MATLAB assume endian?

조회 수: 4 (최근 30일)
Matt
Matt 2017년 11월 29일
댓글: Rik 2017년 11월 29일
I have a piece of code that I wrote to read the MAT-File based on the pdf found here: https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf I have never tried to read a MAT file on my own machine because I have MATLAB and never saw the need. However I tried it recently and was surprised when the code needed to byte swap. The "MI" Endian test resulted in "IM" on my machine. I saved the file from MATLAB 2016a on my local machine (Win 7 i7-4900) and then opened with an executable compiled on this same machine with VC2013.
I am hoping that I am grossly misunderstanding endian and what is going on. Can someone explain?
  댓글 수: 3
Matt
Matt 2017년 11월 29일
I wrote my own. The target machine doesn't have MATLAB installed. I supposed I could just copy the source and library files over.
Rik
Rik 2017년 11월 29일
You can also use Octave (the zip version is portable). One of it's few advantages is that you can run most Matlab functions on machines without Matlab, but using it might be overkill for your case. (Note that I am not advocating for replacing Matlab. It has has way more functions, way better support, this forum, and is often more than 10x faster in running advanced functions. Octave just ahs the advantage of being free.)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by