clear all;

% x, y im Interval [-1,1] (0.1 Schritte)
[X,Y] = meshgrid(-2:0.1:2,-2:0.1:2);
Z = X + i*Y; % Set Z as a complex number (x + y*i)

% The functions
% DON`T FORGET THE ELEMENT-WISE OPERATOR "." (.^, .*, ./)
f1 = @(z) ... % TODO %
f2 = @(z) ... % TODO %

% Plots for function f1
surf(X, Y, real(f1(Z)));
title("Real part of f1(z)");
xlabel("Re(z)");
ylabel("Im(z)");
figure;
surf(X, Y, imag(f1(Z)));
title("Imaginary part of f1(z)");
xlabel("Re(z)");
ylabel("Im(z)");
figure;
surf(X, Y, abs(f1(Z)));
title("Absolute value of f1(z)");
xlabel("Re(z)");
ylabel("Im(z)");
figure; 

% Plots for function f2
surf(X, Y, real(f2(Z)));
title("Real part of f2(z)");
xlabel("Re(z)");
ylabel("Im(z)");
figure;
surf(X, Y, imag(f2(Z)));
title("Imaginary part of f2(z)");
xlabel("Re(z)");
ylabel("Im(z)");
figure;
surf(X, Y, abs(f2(Z)));
title("Absolute value of f2(z)");
xlabel("Re(z)");
ylabel("Im(z)");