GitXplorerGitXplorer
k

matlab-serialization

public
2 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
797e0aa6a28102ee68355ed552624dae229db3ae

Revert "Update serialize.h"

committed 10 years ago
Unverified
4cc7b9a7b2453c4580792515778bfaf1037facc9

Update serialize.h

kkyamagu committed 10 years ago
Unverified
b9e30537526e6c7572eb796fe03341c17290fcab

Updated the package for Matlab 2014a

kkyamagu committed 11 years ago
Unverified
e31eca72d72fd235cd0d4072cb8ff4fec764abc6

Updated README

kkyamagu committed 11 years ago
Unverified
a6f24987d9d6dc9672ff6316a0e112687bd363e1

Simplified type check

kkyamagu committed 11 years ago
Unverified
92799660f9f95df483a310b8d3c16c2e9f2331c4

Simplified type check

kkyamagu committed 11 years ago

README

The README file for this repository.

Matlab serialization

Matlab object serialization functions built with undocumented mex functions mxSerialize and mxDeserialize. The function can convert any ordinary matlab variable into a uint8 array. These functions are unsupported and may change at any time without notice in the future Matlab release. As of Matlab R2014a, there was a big change in these hidden APIs, and this package supports only C++ MEX interface.

Build

Use MEX command in Matlab.

>> cd /path/to/matlab-serialization
>> mex serialize.cc
>> mex deserialize.cc

Alternatively, use the attached Makefile in UNIX.

Usage

Add path to the matlab-serialization and compile before use.

>> addpath('/path/to/matlab-serialization');

Use serialize to encode arbitrary matlab variable. The function returns encoded variable as a uint8 array.

>> x = randn(1,4)

x =

    0.7147   -0.2050   -0.1241    1.4897

>> y = serialize(x)

y =

  Columns 1 through 21

    0    1   73   77    0    0    0    0   14    0    0    0   80 ...

Use deserialize to retrieve the encoded variable.

>> z = deserialize(y)

z =

    0.7147   -0.2050   -0.1241    1.4897

License

The code may be redistributed under the BSD clause 3 license.