Remove every second tick on y-axis

1 visualización (últimos 30 días)
Niles Martinsen
Niles Martinsen el 10 de Sept. de 2012
Hi
I have the following code
x=-6:0.1:6;
figure(1)
plot(x, (1)./(1+4*x.^2), 'b')
grid on
When I plot this, the y-axis runs from 0 to 1 in steps of 0.1. However I would very much like for the y-axis to go in steps of 0.2. Is there a way to remove every second tick and the associated grid-line?
Best, Niels.
  1 comentario
Walter Roberson
Walter Roberson el 10 de Sept. de 2012
set_param would be for simulink, not for basic MATLAB.

Iniciar sesión para comentar.

Respuesta aceptada

Matt Fig
Matt Fig el 10 de Sept. de 2012
set(gca,'ytick',0:.2:1)

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by