Skip to content
Snippets Groups Projects
Commit 97f6a421 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

smirnov_test.m: update call to histc under Matlab

parent 8d8176fc
No related branches found
No related tags found
No related merge requests found
...@@ -34,11 +34,16 @@ end ...@@ -34,11 +34,16 @@ end
% empirical cdfs. % empirical cdfs.
xmix= [x1;x2]; xmix= [x1;x2];
bin = [-inf ; sort(xmix) ; inf]; bin = [-inf ; sort(xmix) ; inf];
if isoctave
ncount1 = histc (x1 , bin); ncount1 = histc(x1 , bin);
ncount1 = ncount1(:); else
ncount2 = histc (x2 , bin); ncount1 = histcounts(x1 , bin);
ncount2 = ncount2(:); end
if isoctave
ncount2 = histc(x2 , bin);
else
ncount2 = histcounts(x2 , bin);
end
cum1 = cumsum(ncount1)./sum(ncount1); cum1 = cumsum(ncount1)./sum(ncount1);
cum1 = cum1(1:end-1); cum1 = cum1(1:end-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment