Area of a triangle

101 views (last 30 days)
Luffy
Luffy on 14 Jun 2012
Moved: DGM on 21 Feb 2023 at 13:05
Is there a function to find area of triangle,not by using Heron's algorithm.

Accepted Answer

Dr. Seis
Dr. Seis on 14 Jun 2012
How about polyarea?
>> x = [0, 0, 4];
>> y = [0, 3, 0];
>> area1 = polyarea(x,y)
area1 =
6
>> area2 = 0.5*3*4
area2 =
6
  5 Comments
SaN AruL
SaN AruL on 25 Nov 2016
Moved: DGM on 21 Feb 2023 at 13:05
thank you Dr. Seis..........

Sign in to comment.

More Answers (1)

AYUSH MISHRA
AYUSH MISHRA on 26 May 2020
function area=tri_area(b,h,n)
area=0.5*b*h*n;
end
%Here b=base of triangle , h=height of triangle , n=number of triangle
Example
area= tri_area(2,3,5)
area =
15

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by