Serialize/Deseriali​ze

Encode and decode almost any matlab variable into a sequence of bytes.

이 제출물을 팔로우합니다

This pair of functions can serialize and deserialize (i.e. encode and decode) almost any matlab object into a sequence of bytes. This will be useful for saving objects to disk, sending them over the network, or perhaps to other programs.

Any combination of structs, cells and matrices are supported. All the data types (i.e. all integer sizes, chars, bools, singles and doubles) are supported. They are automatically converted back to double on decoding, but you can easily change this.

I haven't tested it extensively, but it's quite short so any bugs should be easy to fix.

Usage is like this:

astruct.field1 = [1 2 3]; astruct.field2 = {'foo', 'bar', 'baz'};
serialized_astruct = serialize(astruct);
deserialized_astruct = deserialize(serialized_astruct);

After execution, astruct and deserialized_astruct should be equal.

인용 양식

Tim (2026). Serialize/Deserialize (https://kr.mathworks.com/matlabcentral/fileexchange/29457-serialize-deserialize), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 받은 파일: serialize

도움 준 파일: DataHash, Fast serialize/deserialize

카테고리

Help CenterMATLAB Answers에서 Data Type Conversion에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.1.0.0

Fix bug with single numbers.

1.0.0.0