CSM Object Converter


Convert an object into a struct, and vice versa;

This class contains methods for exporting Matlab objects to structs,

and vice versa.

This class is necessary because if you share data to someone who does

not have the toolbox, or a class definition has been updated, the old

object will not import to their workspace.

Does not support Cell arrays containing objects. ie it will not

recursively loop into a cell array. Convert cell to struct before

using.

Usage

csm_struct = csm_object_converter.toStruct( csm_object );

csm_object = csm_object_converter.toObject( csm_struct );

Methods

MethodDescription
csm_object_converter.toStruct( csm_object )Convert an object to a struct.
csm_object_converter.toObject( csm_struct )Convert an exported struct into an object.

Copyright Imperial College London 2019