MATLAB: X axis seems to show cell numbers and not values

graphplot

So I have exported tables of data using a script and these have been stored correctly. When I use this script:
figure;
x = RT60_Table{:,1};
y = RT60_Table{:,2};
z = RT60_Table{:,3};
e = y.*z./100;
plot(x, y );
set(gca, 'xscale', 'log');
errorbar(y, e);
title('RT60')
xlabel('Frequency Band (Hz)');
ylabel('Time (s)');
The plot looks correct although the x axis doesn't show the numerical values that it has taken, instead it shows the cell number that it's from. Any help?

Best Answer

You didn't specify the x-values in errorbar. Try this
x = RT60_Table{:,1};
y = RT60_Table{:,2};
z = RT60_Table{:,3};
e = y.*z./100;
figure;
plot(x, y );
set(gca, 'xscale', 'log');
figure;
errorbar(x, y, e);
title('RT60')
xlabel('Frequency Band (Hz)');
ylabel('Time (s)');