MATLAB: Subplots with multiple axes

semilogsubplot

I am trying to plot a figure with four subplots. This is what I am entering but it is only producing one graph. Any advice?
n=1:10;
subplot(1,10,n);
plot(x,y,'.-');
subplot(1,10,n);
semilogx(x,y);
subplot(1,10,n);
semilogy(x,y);
subplot(1,10,n);
loglog(x,y);

Best Answer

I think you mean this
n = 10; % 10 subplot but only 4 of them are used ?
subplot(1,n,1);
plot(x,y,'.-');
subplot(1,n,2);
semilogx(x,y);
subplot(1,n,3);
semilogy(x,y);
subplot(1,n,4);
loglog(x,y);