Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Fixed IoSR-Surrey#7 - bug in calculating scatter offset for small or homogenous data sets.
  • Loading branch information
Christopher Hummersone committed Jun 30, 2017
2 parents 3faa79d + 141c288 commit aedab27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion +iosr/+statistics/boxPlot.m
Original file line number Diff line number Diff line change
Expand Up @@ -2345,7 +2345,11 @@ function eventHandler(obj,hProp,eventData)
[d, xd] = iosr.statistics.kernelDensity(y);
d = d./max(d);

maxDisplacement = interp1(xd, d, y);
try
maxDisplacement = interp1(xd, d, y);
catch
maxDisplacement = zeros(size(y));
end
randOffset = rand(size(y));%randperm(numel(y))-1;
randOffset = (2*randOffset) - 1;
% randOffset = (2*randOffset./max(randOffset)) - 1;
Expand Down

0 comments on commit aedab27

Please sign in to comment.