Determine the slope of a line passing through the points a=[x1 y1] and b=[x2 y2].
I strongly suggest you read the "What Makes a Good Problem?" section on http://www.mathworks.com/matlabcentral/anniversary/triathlon_guidelines. Please pay attention to the second guideline: It should have more than one test point.
The problem title and description have been improved and the test suite expanded.
Link from Peng Liu's comment has been down for several days. However the advice is still valid: Test Suites should include at least four test cases — although more are often necessary to prevent hard-coded workarounds.
Thanks to goc3 for improving the Test Suite and fixing the other issues. Those people interested in developing their own test suites might like to try the series of problems starting with https://www.mathworks.com/matlabcentral/cody/problems/44631
Determine if input is odd
Sum of odd numbers in a matrix
Area of a circle
Delete x value in given vector y.
Remove all the columns contains only zero
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