Cody

Solution 382345

Submitted on 9 Jan 2014 by Zikobrelli
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 = [1,0,0]; B = [5,3,0]; Z=[5,3,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
2   Pass
%% A = [1;0;0]; B = [5;3;0]; Z=[5;3;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
3   Pass
%% A = [0,0,0]; B = [4,3,0]; Z=[4,3,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
4   Pass
%% A = [0;0;0]; B = [4;3;0]; Z=[4;3;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
5   Pass
%% A = [0,3,0]; B = [4,0,0]; Z=[4,0,3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
6   Pass
%% A = [0;3;0]; B = [4;0;0]; Z=[4;0;3]; y_correct = 5.830951894845301; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 5.830951894845301
7   Pass
%% A = [0;3;0]; B = [4;0;0]; Z=[4;0;12]; y_correct = 13; assert(isequal(euclidean(A,B,Z),y_correct))
ans = 13