clear;
I=sqrt(-1);
phi=linspace(0,2*pi,13);
z=exp(I*phi);
dz=I*z;
fzdz=z.*dz;
phi_kreis=linspace(0,2*pi,130);
z_kreis=exp(I*phi_kreis);
clf;hold on,axis equal, title('\int f(z) dz')
plot(z_kreis,'k:')
quiver(real(z),imag(z),real(z),imag(z),.5);legend('Integrationsweg','f(z)'),pause
quiver(real(z),imag(z),real(dz),imag(dz),.3);legend('','f(z)','dz'),pause
quiver(real(z),imag(z),real(fzdz),imag(fzdz),.7,'k','LineWidth',2);
legend('','f(z)','dz','f(z)dz'),title('\int f(z) dz=0'),pause

% für verschiedene Potenzen von z
for i=[0 1 -1 -2],
    fz=z.^(i);
    fzdz=fz.*dz;
    clf;hold on,axis equal,title(['\int z^{' int2str(i) '} dz'])
    plot(z_kreis,'k:'),
quiver(real(z),imag(z),real(fz),imag(fz),.5);%legend('Integrationsweg','f(z)')
quiver(real(z),imag(z),real(dz),imag(dz),.3);legend('','f(z)','dz')
quiver(real(z),imag(z),real(fzdz),imag(fzdz),.7,'k','LineWidth',2);
legend('','f(z)','dz','f(z)dz'),
if i~=-1,
    title(['\int z^{' int2str(i) '} dz=0']),
else
    title(['\int z^{' int2str(i) '} dz=2\pi i']),
end
pause
end