How can I change graph label linearly to a time interval

조회 수: 1 (최근 30일)
Dussan Radonich
Dussan Radonich 2021년 6월 19일
댓글: Dussan Radonich 2021년 6월 19일
I have datasets that correspond to a certain time of simulations. When I plot these datasets, the x labels, of course, shows the length of the data. I changed it with
xticks([0 1000 2000 3000])
xticklabels({'0','10','20','30'})
Which is not very accurate, and wanted to know if there is a way of making the length of my data equals to 'x' nanoseconds and then adjust the ticks and labels accordingly.

채택된 답변

LO
LO 2021년 6월 19일
you can create a time vector and plot it together with your data
time = linspace(1,3000,3000)
plot(time, rand(1,3000))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by