clear all;
%uppgift 2a 
x1=1;
y1=-1;
x2=1;
y2=11.5;
x3=11.25;
y3=-1;
x=[x1 x2 x3]';
y=[y1 y2 y3]';
xx=[x;x(1)];
yy=[y;y(1)];
s1=sqrt((x1-x2)^2 + (y1-y2)^2);
s2=sqrt((x1-x3)^2 + (y1-y3)^2);
s3=sqrt((x2-x3)^2 + (y2-y3)^2);
s=[s1 s2 s3];
omkrets=sum(s)
p=omkrets/2
Area=sqrt(p*(p-s(1))*(p-s(2))*(p-s(3)))

%uppgift 2b
plot(x,y,x,y,'*')

%uppgift 2c
hold on
plot(xx,yy)