Problem 2375. Obscured by Earth

Solution 3138981

Submitted on 9 Oct 2020 by Rafael S.T. Vieira
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
x1 = [10e6 10e6 10e6]; x2 = x1.*[-1 -1 1]; assert(isequal(in_los(x1, x2), true))

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

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

4   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))

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), false))

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!