Back to the main page.
Bug 2405 - channelconnectivity fails on test_bug2404
| Status | CLOSED FIXED |
| Reported | 2013-12-03 11:32:00 +0100 |
| Modified | 2014-01-29 13:28:43 +0100 |
| Product: | FieldTrip |
| Component: | core |
| Version: | unspecified |
| Hardware: | PC |
| Operating System: | Mac OS |
| Importance: | P3 normal |
| Assigned to: | Eelke Spaak |
| URL: | |
| Tags: | |
| Depends on: | |
| Blocks: | 2404 |
| See also: |
Robert Oostenveld - 2013-12-03 11:32:59 +0100
I am using cfg.neighbours(1).label = '2'; cfg.neighbours(1).neighblabel = {'1', '3'}; to define the neighbours of a single channel that I want to repair, but get Error using mat2cell (line 107) Input arguments, D1 through D2, must sum to each dimension of the input matrix size, [3 1].' Error in channelconnectivity (line 63) selneighb = mat2cell(selneighb, numAllNeighb); Error in ft_channelrepair (line 151) connectivityMatrix = channelconnectivity(cfg, data); Error in test_bug2404 (line 32) fixedeeg = ft_channelrepair(cfg, eegdata);
Eelke Spaak - 2013-12-05 10:30:11 +0100
In addition to now including an explicit check on whether neighbours are specified as row/column vectors (previously I assumed column), I have wrapped the fast code in a try/catch which falls back on the slow code in case of an error. (I suspect my optimizations cannot be retained if also the one-channel neighbours case needs to be supported, so this seems like the best option.) bash-4.1$ svn commit private/channelconnectivity.m Sending private/channelconnectivity.m Transmitting file data . Committed revision 8966.