how can i change the unit of x axis?

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....

 採用された回答

Mischa Kim
Mischa Kim 2014 年 6 月 30 日

1 投票

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]);

1 件のコメント

suchismita
suchismita 2014 年 6 月 30 日
thank u so much..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2014 年 6 月 30 日

コメント済み:

2014 年 6 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by