how can i change the unit of x axis?

1 visualización (últimos 30 días)
suchismita
suchismita el 30 de Jun. de 2014
Comentada: suchismita el 30 de Jun. de 2014
i have a matrix as A=rand(1,5). i want to plot: a=1:5; plot(a,A); as here in x axis is a can i show the units of a as when a=1 it will show 1(10%),than 2(20%),3(30%),4(40%) and 5(50%) plzzz help me.plz plz....

Respuesta aceptada

Mischa Kim
Mischa Kim el 30 de Jun. de 2014
suchismita, try
A = rand(1,5);
a = 1:5;
plot(a,A);
set(gca,...
'XTickLabel',{'10%','20%','30%','40%','50%'},...
'XTick',[1 2 3 4 5]);

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots 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