Back to the main page.

Bug 489 - savevar (i.e. cfg.outputfile) should use an uncompressed format if the variable is small

Status CLOSED FIXED
Reported 2011-02-11 10:56:00 +0100
Modified 2011-03-23 10:09:06 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 enhancement
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-02-11 10:56:30 +0100

at the moment the data is saved to a compressed/new MATLAB format, which makes it slower. The compressed/new format does however allow larger variables to be stored. Barbara suggested the following ------------------------------------------------- function savevar(filename, varname, value) % SAVEVAR is a helper function for cfg.outputfile % 'value' is the input that should be saved % Copyright (C) 2010, Robert Oostenveld % % $Id: savevar.m 1921 2010-10-13 10:01:18Z craric $ fprintf('writing ''%s'' to file ''%s''\n', varname, filename); eval(sprintf('%s = value;', varname)); s = whos(sprintf('%s',varname)); if s.bytes<500000000 %(500MB) save(filename, varname, '-v6'); else save(filename, varname, '-v7.3'); end


Eelke Spaak - 2011-03-01 16:37:48 +0100

Should we maybe discuss the ~500 MB limit during the meeting? Personally, I think it is a bit high.