Cody

Solution 222567

Submitted on 24 Mar 2013 by Paul Berglund
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.8310
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.8310
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.8310
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.8310
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.8310
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.8310
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