There seem to be some problems. First, in the statement of the problem, I think the correct solution is z=3, not z=4. Second, in the test problems, the function solution() is called with an argument of x. It needs to be solution(x1,x2).
... also, in test #3, the solution is compared to y_correct rather than z_correct.
The problem description and test suite have been cleaned up.
It's an un-document usage of varargout!!!
I solved it in my cell phone.
Find all elements less than 0 or greater than 10 and replace them with NaN
Project Euler: Problem 6, Natural numbers, squares and sums.
Back to basics 10 - Max Float
find radius of cone
Replace odd number in given matrix by zero
Find The Difference
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office