Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1e3;
l = 10;
r = 0.5;
p = [ repmat([.5:9.5]',l^2,1),...
repmat(reshape(repmat([.5:9.5]',1,10)',l^2,1),l,1),...
reshape(repmat([.5:9.5]',1,100)',l^3,1)];
A_test = zeros(l^3);
for i1 = 1:l^3
for i2 = 1:l^3
A_test(i1, i2) = norm(p(i1,:)-p(i2,:));
end
end
assert(isequal(dist_ball(p),A_test))
|
2 | Pass |
n = randi(1e2)
p = randi([-1e6,1e6],n,3);
A_test = zeros(n);
for i1 = 1:n
for i2 = 1:n
A_test(i1, i2) = norm(p(i1,:)-p(i2,:));
end
end
assert(isequal(dist_ball(p),A_test))
n =
83
|
3 | Pass |
assert( isempty(regexp(evalc('type dist_ball'),'(str|printf|eval|flip|dec2base|regexp)')) )
|
3892 Solvers
185 Solvers
450 Solvers
2143 Solvers
156 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!