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类别
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Region and Image Properties >
在 Help Center 和 MATLAB Answers 中查找有关 Region and Image Properties 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |