cstruct

버전 1.0.0.0 (42.3 KB) 작성자: AJ Johnson
A tool for mapping binary data to MATLAB structures and vice versa.
다운로드 수: 4.3K
업데이트 날짜: 2004/6/23

라이선스 없음

cstruct maps bytes (i.e. binary data) to MATLAB structures and vice versa. It is very useful for unpacking binary data from a disk file, or preparing MATLAB data for sending over an interface.

The name 'cstruct' is derived from its original use of reading binary data from a socket interface whose format was based on a C structure. cstruct recasts the received bytes as a MATLAB data type (include simple types, and agregate types - structures and cells).

The mapping is based on a template. A MATLAB object is created that has the desired format/structure. cstruct analyzes the structure and can either extract the bytes from it, or pack bytes into the structure.

Various byte alignment and byte ordering options are supported.

Since I've written this, I've found it to be more useful that I thought, as I regularly deal with recorded data and binary data streams. It really helps bridge the gap between data created with C programs and MATLAB, without having to create specialty mex files, and without using the cumbersome fread function with data type specifiers.

I hope you'll find this useful.

I've provided the .DLL mex function for Microsoft Windows platforms, and the source code for compiling on other (including UNIX) platforms:
mex cstruct.c MatlabCStruct.c

인용 양식

AJ Johnson (2026). cstruct (https://kr.mathworks.com/matlabcentral/fileexchange/4048-cstruct), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dictionaries에 대해 자세히 알아보기
버전 게시됨 릴리스 정보
1.0.0.0

Provided portability to UNIX platforms.