Plotting graph with variables on x axis

17 ビュー (過去 30 日間)
Vinay Srinivasan
Vinay Srinivasan 2019 年 10 月 17 日
コメント済み: Vinay Srinivasan 2019 年 10 月 17 日
Hello all,
I want to plot graph with my x axis as 0 to 1d with intervals 0.2 .It should look like [0,0.2d,0.4d,0.6d,0.8d,1d]
What code I shoul give .

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 10 月 17 日
Something like this:
y = randn(123,1);
x = linspace(0,1,123);
plot(x,y)
xtstr = {'0','0.2d','0.4d','0.6d','0.8d','1d'};
set(gca,'xtick',0:0.2.1,'xticklabel',xtstr)
HTH
  1 件のコメント
Vinay Srinivasan
Vinay Srinivasan 2019 年 10 月 17 日
Thank you so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by