Cody

Solution 1723270

Submitted on 8 Feb 2019 by Justin Lavish
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