among a,b,c., specify the hypotenuse.
that's the tricky part here ;) Check all combinations - too bad 'combvec' doesnt work here
Passes for True, but Failing when I get to false test?? Not sure at the moment what I could be missing.
A great example!
Yes, I finally got it
The 2nd test is incorrect.
function flag = isRightAngled(a,b,c)
x=[a b c];
flag = y(1)^2+y(2)^2==y(3)^2;
flag = false;
A = (acos((b^2+c^2-a^2)/(2*b*c)))*180/pi;
B = (acos((a^2+c^2-b^2)/(2*a*c)))*180/pi;
flag = true;
why is it correct? only because the test case.
a=100, b=20, c=5 will flag true but it not true
Without using str2num or regexp
Back to basics 21 - Matrix replicating
Whether the input is vector?
Fibonacci-Sum of Squares
Pi Digit Probability
Side of a rhombus
Is this triangle right-angled?
Area of an equilateral triangle
Length of the hypotenuse
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