I'm trying to understand semilogy
function which is normally used for plotting data in MATLAB.
As the definition says in MATLAB help section:
semilogy(Y)
creates a plot using a base 10 logarithmic scale for they
-axis and a linear scale for thex
-axis. It plots the columns ofY
versus their index ifY
contains real numbers.
The below code should produce same plot:
y1 = 1:100;
figure
semilogy(y1, 'linewidth', 2);
x2 = 1:100;
y2 = log10(x2);
figure
plot(x2, y2, 'linewidth', 2);
But as we can see, the y-axis limits are different between the plots. Can anybody clear my doubt?