@docfiller
def loadmat(file_name, mdict=None, appendmat=True, **kwargs):
 variable_names = kwargs.pop('variable_names', None)
 MR = mat_reader_factory(file_name, appendmat, **kwargs)
 matfile_dict = MR.get_variables(variable_names)
 if (mdict is not None):
  mdict.update(matfile_dict)
 else:
  mdict = matfile_dict
 if isinstance(file_name, string_types):
  MR.mat_stream.close()
 return mdict

@ docfiller def loadmat ( file_name , mdict = None , appendmat = True , ** kwargs ) : variable_names = kwargs . pop ( 'variable_names' , None ) MR = mat_reader_factory ( file_name , appendmat , ** kwargs ) matfile_dict = MR . get_variables ( variable_names ) if ( mdict is not None ) : mdict . update ( matfile_dict ) else : mdict = matfile_dict if isinstance ( file_name , string_types ) : MR . mat_stream . close ( ) return mdict
load matlab file .