better to describe input size: xy 4-by-2, each row is the xy-coordinate of a point
Needs a richer test suite. A lot of "solvers" have just put a=7 as the "solution", but although this satisfies the single test case, it doesn't solve the problem as stated.
This could be quite a good solution, if you removed the "x = 7; %" part and just left what is now a comment. As it is, although it satisfies the test case, it doesn't actually solve the problem.
... though, just to be clear, the comment wouldn't be quite right, it still needs a little adjustment.
useless solution
Project Euler: Problem 6, Natural numbers, squares and sums.
1058 Solvers
Who knows the last digit of pi?
565 Solvers
Sum of first n terms of a harmonic progression
264 Solvers
166 Solvers
Side of an equilateral triangle
2896 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!