plot x-axis data with discretize

5 次查看(过去 30 天)
Hello experts,
simple question ..
x = 0:2:24;
y= rand(1,13);
plot(x,y)
How can I plot x-axis where it would be like this (0,2,4,6,8 .......etc)?
thanks indeed..

采纳的回答

Star Strider
Star Strider 2021-5-18
Perhaps something like this —
x = 0:2:24;
y= rand(1,13);
plot(x,y)
xticks(0:2:24) % 'xticks' Function Introduced In R2016b
xlim([min(x) max(x)]) % Optional
.

更多回答(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