Main Content

MAT 파일 API 라이브러리 및 include 파일

MATLAB®에서는 MAT 파일을 읽고 쓸 프로그램을 작성하기 위한 include 파일과 라이브러리 파일을 제공합니다. 다음 표에는 이러한 파일의 경로 이름이 나와 있습니다. 여기서 용어 matlabroot는 설치된 MATLAB의 루트 폴더를 나타냅니다. arch라는 용어는 플랫폼을 식별하는 고유 문자열입니다.

MAT 파일 API 폴더

플랫폼

내용

폴더

Microsoft® Windows®

include 파일

matlabroot\extern\include

라이브러리

matlabroot\bin\win64

예제

matlabroot\extern\examples\eng_mat

macOS
Linux®

include 파일

matlabroot/extern/include

라이브러리

matlabroot/bin/arch

예제

matlabroot/extern/examples/eng_mat

MAT 파일 API include 파일

matlabroot\extern\include 폴더에는 API 라이브러리에서 액세스할 수 있는 루틴에 대한 프로토타입과 함께 함수 선언이 들어 있는 헤더 파일이 있습니다. 이러한 파일은 Windows, macOS 및 Linux 시스템에서 모두 동일합니다. 이 폴더에는 다음 파일이 들어 있습니다.

  • mat.hmat 루틴에 대한 함수 프로토타입

  • matrix.hmxArray 구조체의 정의 및 행렬 액세스 루틴에 대한 함수 프로토타입

MAT 파일 API 라이브러리

libmatlibmx 공유 라이브러리가 필요합니다. 파일 이름은 플랫폼마다 다릅니다.

Windows 시스템의 가져오기 라이브러리

lib 폴더에는 다음과 같은 가져오기 라이브러리가 들어 있습니다.

  • MAT 파일 라이브러리 — matlabroot\extern\lib\win64\compiler\libmat.lib

  • 행렬 라이브러리 — matlabroot\extern\lib\win64\compiler\libmx.lib

  • MEX 라이브러리(선택 사항) — matlabroot\extern\lib\win64\compiler\libmex.lib

Linux 시스템의 공유 라이브러리

bin/arch 폴더에는 공유 라이브러리가 포함되어 있습니다(여기서 archcomputer('arch') 명령에 의해 반환된 값임).

  • MAT 파일 라이브러리 — matlabroot/bin/glnxa64/libmat.so

  • 행렬 라이브러리 — matlabroot/bin/glnxa64/libmx.so

  • MEX 라이브러리(선택 사항) — matlabroot/extern/bin/glnxa64/libmex.so

macOS 시스템의 공유 라이브러리

bin/arch 폴더에는 공유 라이브러리가 포함되어 있습니다(여기서 archcomputer('arch') 명령에 의해 반환된 값임). 예를 들어, Apple macOS 64비트 시스템에서 이 폴더는 bin/maci64입니다.

  • MAT 파일 라이브러리 — matlabroot/bin/macos/libmat.dylib

  • 행렬 라이브러리 — matlabroot/bin/macos/libmx.dylib

  • MEX 라이브러리(선택 사항) — matlabroot/extern/bin/macos/libmex.dylib

예제 파일

extern/examples/eng_mat 폴더에는 MAT 파일 루틴의 사용 방법을 보여주는 예제에 대한 C/C++ 및 Fortran 소스 코드가 들어 있습니다.