Area of a triangle

版本 1.0.0 (1.3 KB) 作者: Roberto Datja
There are several ways to compute the area of a triangle. In this code is implemented Heron's Formula.
66.0 次下载
更新时间 2019/5/7

查看许可证

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) )

引用格式

Roberto Datja (2025). Area of a triangle (https://ww2.mathworks.cn/matlabcentral/fileexchange/71481-area-of-a-triangle), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2019a
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0