function [area perimeter] = areaperimeter(b,h) % AREAPERIMETER calculates the area and perimeter of a right triangle % given the base and height. Area = 0.5 * b * h % perimeter = b + h + sqrt(b^2 + h^2) area=b*h/2; perimeter= b + h + sqrt(b^2+h^2);