% File: E2_034B.M

clear;

for (k = 1:10)
  f(k) = 10*2^(-10)*2^k;
  W(k) = 1/(1 + 2*pi*f(k)*sqrt(-1));
end;

B = log10(W);
WdB = 20*real(B);
Theta = 180/pi*imag(B);
subplot(211);
semilogx(f,WdB);
xlabel('f');
ylabel('W(f) in dB');
grid;

subplot(212);
semilogx(f,Theta);
xlabel('f');
ylabel('Angle of W(f)');
grid;
subplot(111);



