Cody

# Problem 144. Angle of triangle

Solution 336490

Submitted on 21 Oct 2013 by Zikobrelli
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
ab=rand; bc=rand; ca=max(min(rand, ab+bc),abs(ab-bc)); tic; for k=1:10^3 [abc,bca,cab]=sides_to_angles(ab,bc,ca); end; your_time=toc/10^3 test_yours=round([abc,bca,cab]*10^4)/10^4 abc=acos((ab^2+bc^2-ca^2)/2/ab/bc); bca=acos((bc^2+ca^2-ab^2)/2/bc/ca); cab=acos((ca^2+ab^2-bc^2)/2/ca/ab); test_correct=round([abc,bca,cab]*10^4)/10^4 assert(isequal(test_yours,test_correct)) % assert(your_time<100e-6)

bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca = 0.6788 cab = 0.9829 bca...

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}