The instructions were a bit confusing at first. It would have been better to say "Find the row number of the outlying point."
Also, using the third row as an answer and a 3 in a column of zeros makes it seem like the intent was to provide unclear instructions. (Or they are just used to writing college textbooks ;) )
The test set cases 2,3 seems to have two outliers for each case. Please check it
Uses the formula for perpendicular distance of a point to a line when the line is not axis orthogonal.
Very interesting, why the test# 3 is not passed. It turned out that the two number
(x4-x1)*(y2-y1) is not the same as (y4-y1)*(x2-x1) due to floating point. I have to compare the subtraction with 10*eps.
Very interesting. I could not understand why I had not passed the test# 3. It turned out that the two number (x4-x1)*(y2-y1) and (y4-y1)*(x2-x1) are not the same due to floating point. My choice is to compare the absolute difference with 10*eps.
I'll try to improve it!
all tests are solved test3, i don't know what is the problem
I'm sorry for this :(
I got it on solution 600827.
Doesn't work with outlier in first position.
Could have been MUCH smaller, but corrcoef doesn't like x=0 the first test case.
Find state names that start with the letter N
Back to basics 5 - Clipboard
How many trades represent all the profit?
Who invented zero?
Relative ratio of "1" in binary number
Beads on a Necklace (Convex Hulls)
Find the Next Legal Move in Reversi
2048 Next Move
Is this group simply connected?
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