Authored by Anthony B

Fix for Matlab2015b

@@ -102,8 +102,8 @@ function ImaGIN_SpikesDetection(S) @@ -102,8 +102,8 @@ function ImaGIN_SpikesDetection(S)
102 [lines cols] = find(~isnan(all_coordinates)); 102 [lines cols] = find(~isnan(all_coordinates));
103 coordinates_with_values = all_coordinates(unique(lines),:); 103 coordinates_with_values = all_coordinates(unique(lines),:);
104 if isempty(coordinates_with_values) 104 if isempty(coordinates_with_values)
105 - coordinates(nn,:) = NaN(1,3);  
106 - elseif sum(all(coordinates_with_values == coordinates_with_values(1,:))) == 3 105 + coordinates(nn,:) = NaN(1,3);
  106 + elseif sum([range(coordinates_with_values(:,1)) == 0, range(coordinates_with_values(:,2)) == 0, range(coordinates_with_values(:,3)) == 0]) == 3
107 coordinates(nn,:) = coordinates_with_values(1,:); 107 coordinates(nn,:) = coordinates_with_values(1,:);
108 else 108 else
109 error('Inconsistent electrodes coordinates between cropped files.'); 109 error('Inconsistent electrodes coordinates between cropped files.');
@@ -122,7 +122,7 @@ function ImaGIN_SpikesDetection(S) @@ -122,7 +122,7 @@ function ImaGIN_SpikesDetection(S)
122 end 122 end
123 123
124 for ll=1:size(rates_labels,1) 124 for ll=1:size(rates_labels,1)
125 - if all(strcmp(rates_labels(ll,:),rates_labels{ll,1})==1) 125 + if all(strcmp(rates_labels(ll,:),rates_labels{ll,1}))
126 bipolar_labels{ll} = rates_labels{ll,1}; 126 bipolar_labels{ll} = rates_labels{ll,1};
127 else 127 else
128 error('Inconsistent labels between bipolar baselines'); 128 error('Inconsistent labels between bipolar baselines');