Cody

Solution 52032

Submitted on 26 Feb 2012 by Raphael Cautain
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))
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))
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))
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))
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))
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))
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))