Borrar filtros
Borrar filtros

How to change the relative scaling of my x-axis

1 visualización (últimos 30 días)
pete4466
pete4466 el 20 de Mzo. de 2022
Comentada: Star Strider el 20 de Mzo. de 2022
I am plotting values from a function on the y-axis against an array on the x-axis =
M_varied=[500,1000,2000,4000,8000,16000,32000,64000,128000,256000,512000,1024000,2048000,4096000,8192000,16384000]
The fact that the array values double in size for each index mean that the x-coordinates of my plotted values are very spread out and make my graph difficult to read
How do I change the scaling of the x-axis so that large values are proportionally closer to the smaller values, so the x-axis values aren't so spread out. For example I was hoping to have equally spaced x-ticks of 10^2, 10^3, 10^4 etc..?
Thanks

Respuesta aceptada

Star Strider
Star Strider el 20 de Mzo. de 2022
See if the semilogx function produces the desired result.
  2 comentarios
pete4466
pete4466 el 20 de Mzo. de 2022
That works perfectly thank you
Star Strider
Star Strider el 20 de Mzo. de 2022
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by