MATLAB: Standard separation of x axis tick marks

MATLABticks

Hello,
I'm writing a program for a class that plots a transfer function to the omega(rad/s) and the phase angle to omega(rad/s) but I'm running into the problem of the graph not looking the way it needs to. below is the code i wrote so you can see what the graph currently looks like and i figured out how to label the ticks correctly but HOW DO YOU GET THE TICKS SPACED EVENLY when the the numbers are xticks([10^0 10^2 10^4 10^6])?
% Input Variable Section:
R = 10000%input('What is the resistance (in ohms)? ');
L = 1%input('What is the inductance (in henries)? ');
omega1 = 1%input('what is the starting frequency (in radians/sec)? ');
omega2 = 1000000%input('what is the ending frequency (in radians/sec)? ');
dw = (omega2-omega1)/1000;
% Parameter Section:
omega = omega1:dw:omega2;
% Calculation Section:
T = R./(L.*omega);
H = 1./(sqrt(1+(T).^2));
decibels = 20.*log10(H);
phi = atand(T);
table = [omega',T',H',decibels',phi'];
% Output Variable Section:
subplot(1,2,1)
plot(omega,decibels),xlabel('Omega (rad/s)'),ylabel('Hv'),title('High Pass RL Filter Transfer Function')
xticks([10^0 10^2 10^4 10^6])
subplot(1,2,2)
plot(omega,phi), xlabel('Omega (rad/s)'),ylabel('Phase Angle'),title('High Pass RL Filter Phase Angle')
xticks([10^0 10^2 10^4 10^6])

Best Answer

Plot them using semilogx:
% Output Variable Section:
subplot(1,2,1)
semilogx(omega,decibels),xlabel('Omega (rad/s)'),ylabel('Hv'),title('High Pass RL Filter Transfer Function')
xticks([10^0 10^2 10^4 10^6])
subplot(1,2,2)
semilogx(omega,phi), xlabel('Omega (rad/s)'),ylabel('Phase Angle'),title('High Pass RL Filter Phase Angle')
xticks([10^0 10^2 10^4 10^6])
Equivalently, you can use:
set(gca, 'XScale','log')
for each subplot.