www.pudn.com > baojiading.rar > triarea.m, change:2009-03-04,size:208b


function A=triarea(a,b,c) 
if a<0|b<0|c<0 
    disp('The a,b,c must be positive number.') 
end 
if a+b<c|a+c<b|b+c<a 
    disp('Thia is impossible.') 
end 
     s=(a+b+c)/2; 
     A=s*(s-a)*(s-b)*(s-c)^(1/2);