, mdict, appendmat=True, format='5', long_field_names=False, do_compression=False, oned_as=None)

Save a dictionary of names and arrays into the MATLAB-style .mat file.

This saves the arrayobjects in the given dictionary to a matlab style .mat file.

Parameters :

file_name : {string, file-like object}

Name of the mat file (do not need .mat extension if appendmat==True) Can also pass open file-like object

m_dict : dict

dictionary from which to save matfile variables

appendmat : {True, False} optional

True to append the .mat extension to the end of the given filename, if not already present

format : {‘5’, ‘4’} string, optional

‘5’ for matlab 5 (up to matlab 7.2) ‘4’ for matlab 4 mat files

long_field_names : boolean, optional, default=False

  • False - maximum field name length in a structure is 31 characters which is the documented maximum length
  • True - maximum field name length in a structure is 63 characters which works for Matlab 7.6

do_compression : {False, True} bool, optional

Whether to compress matrices on write. Default is False

oned_as : {‘column’, ‘row’} string, optional

If ‘column’, write 1D numpy arrays as column vectors If ‘row’, write 1D numpy arrays as row vectors

Previous topic

Next topic

This Page