Cody

Solution 461210

Submitted on 24 Jun 2014 by Abdullah Caliskan
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
%% xyz = [3,4,2; 0,0,2; 0,1,2; 1,1,2; 1,1,20]; w_correct = 25; assert(isequal(walked(xyz),w_correct))

P = [] y = 5.0000 0 1.0000 1.4142 18.0555 P = 5 y = 4.2426 1.0000 0 1.0000 18.0278 P = 5 1 y = 3.6056 1.4142 1.0000 0 18.0000 P = 5 1 1 y = 18.3576 18.0555 18.0278 18.0000 0 P = 5 1 1 18 ans = 25

2   Pass
%% xyz = [3,4,2; 0,0,2; 0,1,2; 1,1,2; 1,5,5]; w_correct = 12; assert(isequal(walked(xyz),w_correct))

P = [] y = 5.0000 0 1.0000 1.4142 5.9161 P = 5 y = 4.2426 1.0000 0 1.0000 5.0990 P = 5 1 y = 3.6056 1.4142 1.0000 0 5.0000 P = 5 1 1 y = 3.7417 5.9161 5.0990 5.0000 0 P = 5 1 1 5 ans = 12

Suggested Problems

More from this Author100