Skip to content

Commit

Permalink
Bugfix: Fixed computation of clusters mean+std and mean+stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Jul 8, 2020
1 parent 5522c90 commit fe485c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion toolbox/gui/view_clusters.m
Expand Up @@ -169,8 +169,10 @@
clustersActivity{iFile,k} = bst_scout_value(DataToPlot, ClusterFunction);
if ~isempty(StdFunction)
clustersStd{iFile, k} = bst_scout_value(DataToPlot, StdFunction);
elseif ~isempty(DataStd)
elseif ~isempty(DataStd) && all(size(clustersActivity{iFile,k}) == size(DataStd))
clustersStd{iFile, k} = DataStd;
else
clustersStd{iFile, k} = [];
end

% === AXES LABELS ===
Expand Down
4 changes: 2 additions & 2 deletions toolbox/math/bst_scout_value.m
Expand Up @@ -120,10 +120,10 @@
Fs = mean(F,1);
% STD : Standard deviation of the patch activity at each time instant
case 'std'
Fs = std(F,1);
Fs = std(F,[],1);
% STDERR : Standard error
case 'stderr'
Fs = std(F,1) ./ size(F,1);
Fs = std(F,[],1) ./ size(F,1);
% RMS
case 'rms'
Fs = sqrt(sum(F.^2,1));
Expand Down

0 comments on commit fe485c5

Please sign in to comment.