serialize

버전 1.0.0.0 (1.98 KB) 작성자: Jøger Hansegård
Create matlab code from a variable
다운로드 수: 2.6K
업데이트 날짜: 2006/8/29

라이선스 없음

matcode = SERIALIZE(x) generates matlab code of x
matcode = SERIALIZE(x, n) generates matlab code of x retaining n digits
of precision

SERIALIZE should be able to create matlab code of the following data types:
- matrices, vectors, and scalars of any class and dimension
- strings
- structs, arrays of structs with up to six dimensions
- cell arrays
- matlab objects with a copy constructor implemented
- empty values of any class
- any combinations hereof

The value of x can be obtained by
eval(matcode)

Examples
x = [1 2 3; 3 4 5];
serialize(x)

x = uint8(rand(10)*5);
matcode = serialize(x)

x = {rand(3,3,3,4), 'a string value', {1 2 3; 1 3 3 }}
matcode = serialize(x, 30)

인용 양식

Jøger Hansegård (2024). serialize (https://www.mathworks.com/matlabcentral/fileexchange/12063-serialize), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Programming에 대해 자세히 알아보기
도움

줌: Serialize/Deserialize

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Fixed bug when serializing strings with special characters