Back to the main page.

Bug 3183 - cfg.outputfile saves default variable names that are difficult to guess

Status NEW
Reported 2016-10-01 12:35:00 +0200
Modified 2016-10-01 12:35:47 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 enhancement
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2016-10-01 12:35:47 +0200

depending on the function, the mat file might contain data, mir, resliced, interp, or whatever. Loading the mat files yourself therefore results in an unpredictable variable appearing in working memory. I see three possible improvements. In case the user also specifies an outut variable, the name of that output variable is used to store the data in the file. This assumes that the output variable name can be determined. We always store the data with the save variable name, e.g. "data". We expose the loader and saver functions. See also #138 for historical perspective.