The test suite checks for equality, but different techniques have small numerical differences. The test suite should allow for these differences, as it eliminates many solutions that are correct.
This problem has been updated to check against a small error value rather than for equality.
d1=sqrt((X(2)-X(1))^2+(Y(2)-Y(1))^2); %distancia de A hasta B
d2=sqrt((X(3)-X(1))^2+(Y(3)-Y(1))^2); %distancia de A hasta C
d3=sqrt((X(3)-X(2))^2+(Y(3)-Y(2))^2); %distancia de B hasta C
y=sqrt(s*(s-d1)*(s-d2)*(s-d3)) %Fórmula de Herón
Project Euler: Problem 6, Natural numbers, squares and sums.
Who has power to do everything in this world?
Area of an equilateral triangle
Solving Quadratic Equations (Version 1)
Replace Vector Elements
Are all the three given point in the same line?
Soccer - TOTO
Find nearest prime number less than input number
arrangement of symbols
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