A student was trying to position wells to dewater a construction site, and her instructor asked her to send the well coordinates so that he could check her design. However, instead of the coordinates, she sent the horizontal offsets (e.g., north-south, east-west) from specified reference points.
Rather than ask the student to send the coordinates again, the instructor determined a way to compute the coordinates from the information the student had sent.
Write a function that takes coordinates of references points (xr, yr) and x and y offsets (dx and dy) and determine the coordinates of the mystery point. If there is no solution, return NaN for both x and y.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers2
Suggested Problems
More from this Author330
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Thanks for the problem, Chris! The order of the function arguments is different in the solution template and the test suite; perhaps you can fix the former, this tripped me up at first.
Sorry about that--fixed. Thanks for letting me know, Christian.