Area of a triangle
Versión 1.0.0 (1,28 KB) por
Roberto Datja
There are several ways to compute the area of a triangle. In this code is implemented Heron's Formula.
You can calculate the area of a triangle if you know the lengths of all three sides, using a formula that has been known for nearly 2000 years.
It is called "Heron's Formula" after Hero of Alexandria (see below)
Just use this two step process:
Step 1: Calculate "s" (half of the triangles perimeter):
p = (a+b+c)/2
Step 2: Then calculate the Area:
herons formula A = sqrt( p(p-a)(p-b)(p-c) )
Citar como
Roberto Datja (2024). Area of a triangle (https://www.mathworks.com/matlabcentral/fileexchange/71481-area-of-a-triangle), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2019a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Region and Image Properties >
Más información sobre Region and Image Properties en Help Center y MATLAB Answers.
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0 |