% Create the data
w_min = 10^(-3);
w_max = 10^2;
k1 = log10(w_min);
k2 = log10(w_max);


N = 100;

n = 1:1:N;
w(n) = 10.^(k1 + ((n-1)./N).*(k2-k1));


T_G = 3;
H1db(n) = 20.*log10(abs(1./(1 + j.*w(n).*T_G)));

%Create the plot
figure(1);
semilogx(w,H1db);

% Label the plot
xlabel('Frequency (radians/sec)');
ylabel('Magnitute (dB)');
title('Bode Plot','FontSize', 14);
pause


figure(1);
T_W = 1.0;
H3db(n) = 20.*log10(abs((1 - j.*w(n).*T_W)./(1 + j.*w(n).*T_G)));
semilogx(w,H3db);
grid on;

% Label the plot
xlabel('Frequency (radians/sec)');
ylabel('Magnitute (dB)');
title('Bode Plot','FontSize', 14);