Cody

# Problem 2375. Obscured by Earth

Solution 461724

Submitted on 25 Jun 2014 by Alfonso Nieto-Castanon
• Size: 34
• This is the leading solution.
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

2   Pass
%% x1 = [10e6 10e6 10e6]; x2 = x1.*[-1 -1 1]; assert(isequal(in_los(x1, x2), true))

3   Pass
%% x1 = [10e6 10e6 10e6]; x2 = 2*x1; assert(isequal(in_los(x1, x2), true))

4   Pass
%% x1 = [10e6 10e6 10e6]; x2 = -x1; assert(isequal(in_los(x1, x2), false))

5   Pass
%% x1 = 2*(6378137+1e-3)/sqrt(3)*[1 1 0]/sqrt(2); x2 = 2*(6378137+1e-3)/sqrt(3)*[1 0 1]/sqrt(2); assert(isequal(in_los(x1, x2), true))

6   Pass
%% x1 = 2*(6378137-1e-3)/sqrt(3)*[1 1 0]/sqrt(2); x2 = 2*(6378137-1e-3)/sqrt(3)*[1 0 1]/sqrt(2); assert(isequal(in_los(x1, x2), false))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!