savestruct#

Purpose#

Saves a matrix of structures to a file on the disk.

Format#

retcode = saveStruct(instance, file_name)#
Parameters:
  • instance (structure) – instances of a structure.

  • file_name (string) – name of file on disk to contain matrix of structures.

Returns:

retcode (scalar) – 0 if successful, otherwise it will be non-zero.

Examples#

// Create DS structure
struct DS p0;
p0 = reshape(dsCreate(), 2, 3);

// Save the p0 DS structure as p2
retc = saveStruct(p0, "p2");

Remarks#

The file on the disk will be given a .fsr extension