Back to the main page.

Bug 2571 - bug in ft_componentanalysis

Status CLOSED FIXED
Reported 2014-05-12 11:10:00 +0200
Modified 2019-08-10 12:28:51 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jörn M. Horschig
URL:
Tags:
Depends on: 2570
Blocks:
See also:

- 2014-05-12 11:10:59 +0200

Hi guys, Trying to run an ICA on my data I get ??? Error using ==> eval Undefined function or variable 'unknown'. Error in ==> scalingfactor at 165 eval(sprintf('newunit = %s;', new)); Error in ==> scalingfactor at 87 factor = cellfun(@scalingfactor, old, new); Error in ==> ft_apply_montage at 266 scale = scalingfactor(input.chanunit, montage.chanunitorg); Error in ==> ft_componentanalysis at 747 comp.(sensfield) = ft_apply_montage(data.(sensfield), montage, 'balancename', 'comp', 'keepunused', 'yes'); input arguments were: cfg=[]; cfg.method='fastica'; cfg.numcomponent=3; %just for testing comp=ft_componentanalysis(cfg,data_all); data_all structure has the following fields: data_all = label: {274x1 cell} trial: {1x341 cell} time: {1x341 cell} sampleinfo: [341x2 double] grad: [1x1 struct] cfg: [1x1 struct] trialinfo: [341x1 double] Looks like some field is being assigned as 'unknown' (because some subfunction cannot categorise it) and then this string is being evaluated later on leading to an error. The data is regular MEG data from the CTF at the donders.


Jörn M. Horschig - 2014-05-12 11:27:22 +0200

see bug 2570, I guess Robert made a fix without checking. I'll fix, wait a sec ;)


Jörn M. Horschig - 2014-05-12 11:30:21 +0200

svn ci scalingfactor.m -m "bugfix #2571 - eval statements fixed" Sending scalingfactor.m Transmitting file data . Committed revision 9494. changed to 'new' (in the following line 'old')


Robert Oostenveld - 2014-05-12 12:14:26 +0200

(In reply to Jörn M. Horschig from comment #1) indeed my bad, thanks for the quick fix.


- 2014-05-12 12:15:36 +0200

Fixed!


Robert Oostenveld - 2019-08-10 12:28:51 +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.