Back to the main page.

Bug 1469 - inputfile in ft_preprocessing

Status CLOSED FIXED
Reported 2012-05-10 17:21:00 +0200
Modified 2019-08-10 11:55:49 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Gio Piantoni
URL:
Tags:
Depends on:
Blocks:
See also:

Gio Piantoni - 2012-05-10 17:21:09 +0200

Hi, inputfile and outfile are very cool but I get this error in ft_preprocessing when I do: cfg = []; cfg.inputfile = '/path/to/file.mat' ft_preprocessing(cfg); Error using ft_checkconfig (line 149) The field cfg.datafile is required The field cfg.headerfile is required Error in ft_preprocessing (line 340) cfg = ft_checkconfig(cfg, 'required', {'headerfile', 'datafile'}); It's because line 261 use nargin to see if data exists. I suggest to change from hasdata = (nargin>1); to: hasdata = exist('data', 'var'); Should I commit it? Are there more elegant ways?


Gio Piantoni - 2012-05-10 18:10:37 +0200

And related to this: line 557 should become: if hasdata otherwise cfg does not create a 'previous' field.


Jan-Mathijs Schoffelen - 2012-05-10 20:30:33 +0200

This looks OK to me Giovanni, please go ahead. We'll notice soon enough if it breaks anything ;-)


Gio Piantoni - 2012-05-11 09:32:04 +0200

Commit submitted at revision 5764 Reopen if it breaks anything. Cheers


Robert Oostenveld - 2019-08-10 11:51:53 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 11:55:49 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.