Problem 44365. An asteroid and a spacecraft
Solution Stats
Problem Comments
-
3 Comments
Needs more test cases to eliminate the the trivial non-solution that exploits the lack of test cases.
This problem needs more test cases. My solution probably is not general, but it works without using all of its tests.
An interesting test case, for instance, would be (that my solution and many others would fail):
p0 = [1, 0, 0];
p1 = [ -1, 0, 0];
p2 = [ 0, 1, 0.5];
p3 = [ 0, -1, 0.5];
t0 = 0;
t1 = 1;
d = 1;
ok = false;
At half-way their path, asteroid and spacecraft will be at distance 0.5 of each other, violating the safe distance d=1, and without crossing paths.
Solution Comments
Show commentsProblem Recent Solvers157
Suggested Problems
-
Test if a Number is a Palindrome without using any String Operations
219 Solvers
-
247 Solvers
-
Change the sign of even index entries of the reversed vector
458 Solvers
-
11750 Solvers
-
Find the Oldest Person in a Room
14273 Solvers
More from this Author100
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!