Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stale testing code in chunkerfit #72

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions chunkie/chunkerfit.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
%
% See also CHUNKERFUNC, CHUNKERPREF, CHUNKER.

if ( nargin == 0 )
test();
return
end

if ( size(xy, 1) ~= 2 )
error('CHUNKIE:CHUNKERFIT:size', 'Points must be specified as a 2xN matrix.');
end
Expand Down Expand Up @@ -120,20 +115,6 @@

end

function test()

rng(0)
r = chnk.curves.bymode(sort(2*pi*rand(20,1)), [2 0.5 0.2 0.7]);
chnkr = chunkerfit(r);

plot(chnkr, 'bo-')
hold on
plot(r(1,:), r(2,:), 'r.', markersize=30)
hold off
shg

end

function y = myppval(breaks, cfs, x)
[~, idx] = histc(x, [-inf; breaks(2:end-1); inf]);
p = reshape((x-breaks(idx)).^(3:-1:0), [1 size(idx,1) size(cfs,3)]);
Expand Down
Loading