rendered paste bodyp1 = [0.1,-0.7,1.4,-0.8];
p2 = [-0.2,1.2,-1.35];
[x_inter,y_inter] = polyintersec(p1,p2);
A = polyarea(x_inter(1),x_inter(ceil(end/2)),p1,p2);
C1 = polylength(x_inter(1),x_inter(ceil(end/2)),p1);
C2 = polylength(x_inter(1),x_inter(ceil(end/2)),p2);
C = abs(C1 + C2);
x_1 = linspace(x_inter(ceil(end/2)),x_inter(1),100);
x_2 = linspace(x_inter(1),x_inter(ceil(end/2)),100);
y_1 = polyval(p1,x_1);
y_2 = polyval(p2,x_2);
x_f = [x_1,x_2];
y_f = [y_1,y_2];
x = linspace(-1,6,100);
y11 = polyval(p1,x);
y22 = polyval(p2,x);
flaeche = ['A = ' num2str(A)];
umfang = ['C = ' num2str(C)];
figure
hold on;
plot(x,y11,'b');
plot(x,y22,'r');
fill(x_f,y_f, [0.7 0.7 0.7]);
axis square;
hx = (x_inter(ceil(end/2)) + x_inter(1)) /2 - 0.5;
hy = (polyval(p1,x_inter(ceil(end/2))));
text (hx,hy,flaeche);
text (hx,hy+0.5,umfang);
xlabel('x-Achse');
ylabel('y-Achse');
title('Plot von Polynomen, Flaecheninhalt und Umfang');
hold off;