Cody

Solution 406353

Submitted on 19 Feb 2014 by James
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% a = [9 10 3 10 10; 10 7 6 2 5; 2 1 10 10 9]; b = [2 8 1; 5 10 9; 10 7 10]; d = [11.7473 5.0990 11.3578; ... 12.2066 7.0000 12.8841; ... 1.4142 7.0711 3.6056; ... 8.5440 8.7750 11.4018; ... 8.0623 5.7446 9.8995]; assert(all(all(abs(pairEuc(a,b)-d)<1e-4)))
d = 11.7473 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 0 0 0 0 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 0 0 0 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 0 0 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 0 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 0 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 0 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 0 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 0 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 0 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 8.7750 0 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 8.7750 11.4018 0 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 8.7750 11.4018 8.0623 0 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 8.7750 11.4018 8.0623 5.7446 0 d = 11.7473 5.0990 11.3578 12.2066 7.0000 12.8841 1.4142 7.0711 3.6056 8.5440 8.7750 11.4018 8.0623 5.7446 9.8995
2   Pass
%% a = [1 2; 3 4]'; b = [5 6; 7 8; 9 10]'; d = [5.6569 8.4853 11.3137;... 2.8284 5.6569 8.4853]; assert(all(all(abs(pairEuc(a,b)-d)<1e-4)))
d = 5.6569 0 0 0 0 0 d = 5.6569 8.4853 0 0 0 0 d = 5.6569 8.4853 11.3137 0 0 0 d = 5.6569 8.4853 11.3137 2.8284 0 0 d = 5.6569 8.4853 11.3137 2.8284 5.6569 0 d = 5.6569 8.4853 11.3137 2.8284 5.6569 8.4853