Back to the main page.
Bug 2622 - ft_appenddata typo
Status | CLOSED FIXED |
Reported | 2014-06-23 16:27:00 +0200 |
Modified | 2019-08-10 12:29:09 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Eelke Spaak |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
- 2014-06-23 16:27:41 +0200
Hey guys, In ft_appenddata, lines 271... if hassampleinfo && ~isequaln(data.sampleinfo, varargin{i}.sampleinfo) ...and 274... if hastrialinfo && ~isequaln(data.trialinfo, varargin{i}.trialinfo) ...should read 'isequal' instead of 'isequaln', I think.
Eelke Spaak - 2014-06-23 16:31:33 +0200
isequaln tests for equality with equal NaNs; isequal treats data differently even if the NaNs are equal: >> isequal([1 2 nan], [1 2 nan]) ans = 0 >> isequaln([1 2 nan], [1 2 nan]) ans = 1 so it is correct the way it is :)
- 2014-06-23 16:43:39 +0200
In that case there's something funny going on, as just now I got this error. >> data_corr{i}=ft_appenddata([],data_meg{i},eyes{i}); input dataset 1, 274 channels, 1 trials input dataset 2, 3 channels, 1 trials concatenating the channels within each trial ??? Undefined function or method 'isequaln' for input arguments of type 'double'. Error in ==> ft_appenddata at 271 if hassampleinfo && ~isequaln(data.sampleinfo, varargin{i}.sampleinfo) >> which isequaln 'isequaln' not found.
Eelke Spaak - 2014-06-23 16:49:21 +0200
(In reply to t.marshall from comment #2) Hmm. Which MATLAB version are you using?
- 2014-06-23 16:56:25 +0200
>> version ans = 7.12.0.635 (R2011a)
Jörn M. Horschig - 2014-06-24 09:44:36 +0200
use to be isequalwithequalnans prior to 2012a: http://www.mathworks.com/matlabcentral/answers/56344-why-replace-isequalwithequalnans-with-isequaln
Eelke Spaak - 2014-06-24 09:47:36 +0200
(In reply to Jörn M. Horschig from comment #5) See bug 2519, working on it.
Eelke Spaak - 2014-06-24 09:50:06 +0200
Should work now. bash-4.1$ svn commit compat/ ft_defaults.m Adding compat/matlablt2012a Adding compat/matlablt2012a/isequaln.m Sending ft_defaults.m Transmitting file data .. Committed revision 9674.
Eelke Spaak - 2014-06-24 09:50:28 +0200
(In reply to Eelke Spaak from comment #7) (PS: after executing ft_defaults again, once it's updated on /home/common/)