Back to the main page.

Bug 3299 - the output of "find" is always positive integers

Status CLOSED FIXED
Reported 2017-05-26 20:26:00 +0200
Modified 2018-01-26 09:50:37 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

SM - 2017-05-26 20:26:32 +0200

In the ft_spik_waveform function, there is these two lines: d = find(squeeze(nansum(diff(mnOverLead(:,1:iup,:),[],2),2))); rm1 = find(d<0); no matter what the data is, the result of a "find" function will be a vector of "indices" which logically cannot be zero or less than zero (irrespective of the data). so these two lines is not a "bug" per say but they are useless, or in other words they don't perform what was intended. Please correct me if I'm wrong. Sincerely Sara


Robert Oostenveld - 2017-05-28 12:36:58 +0200

Thanks for reporting. @Martin (CC), could you have a look?


Jan-Mathijs Schoffelen - 2017-11-28 12:14:47 +0100

Fixed with github PR598