MATLAB: Setting the step of x and y axes

axes

I'm looking for the way to set the step of x and y axes. does it exist a way?

Best Answer

t=0:0.1:10
y=cos(t)
plot(t,y)
set(gca,'xtick',linspace(min(t),max(t),8),'ytick',linspace(min(y),max(y),8))