Cody

Problem 2375. Obscured by Earth

Solution 459428

Submitted on 20 Jun 2014 by Marco Castelli
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))

Suggested Problems

More from this Author1