Problem 2016. Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
Image courtesy of Wikipedia.
Solution Stats
Problem Comments
-
8 Comments
Show
5 older comments
Adi Zabidi
on 27 Dec 2016
yay
haziq hadi
on 27 Dec 2016
ok
Howard Clark
on 19 Oct 2017
Nice problem!!!
jack walker
on 2 Aug 2019
yes nice problem
Zsombor Nánai
on 16 Feb 2020
Nice!
Kaan Orhan Sergin
on 13 Jun 2020
Nice
Rahul Gulia
on 24 Sep 2021
Any idea of optimizing my answer?
function y = equilateral_area(x)
side_1 = (x/2)/tand(30);
y = (x/2)*side_1;
end
Isabella Stellitano
on 13 Nov 2021
good problem
Solution Comments
Show commentsProblem Recent Solvers6191
Suggested Problems
-
Remove all the words that end with "ain"
2297 Solvers
-
3367 Solvers
-
Change the sign of even index entries of the reversed vector
553 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1072 Solvers
-
1309 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!