필터 지우기
필터 지우기

Plotting graph with variables on x axis

조회 수: 12 (최근 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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-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