You need to put correct test cases, not a function that implements one solution for the problem. ;-)
I fixed the test cases.
Nice!! but maybe you put 5 or 6 cases, so it is not easy to cheat... ;-)
Thank you for your comments, this was my first problem to post.
the function name of this problem is conflict with system function 'reverse', so can't be executed.
Reverse is now a command on Matlab. Kindly change the name of the function here @Joseph Pauwels
The function name has been updated. The problem should now be solvable.
reverse now it's a function in Matlab, so try to change this name https://www.mathworks.com/help/matlab/ref/reverse.html
not working please help me
Back to basics 4 - Search Path
Sum the elements in either diagonal of a square matrix
sum of first 'n' terms
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