MATLAB Answers

0

How to avoid printing certain values in axes of a plot?

Asked by Gayan Lankeshwara on 18 Nov 2019 at 4:58
Latest activity Commented on by Gayan Lankeshwara on 18 Nov 2019 at 21:09
I have the following plot
Since x-axis is the 'number of iterations' . I need to avoid prinitng float values.
What is want is only [1,2,3,4].
Below is my code.
Thank you.
for mm = 1:num_intervals
plot([1,2,3,4], CI')
end
xlabel('Iteration Number')
ylabel ('CI')
legend('App_1','App_2','App_3','App_4','App_5','App_6','App_7','App_ 8','App_9','App_{10}')
CI_variation.png

  0 Comments

Sign in to comment.

Tags

Products


Release

R2019a

1 Answer

Answer by KALYAN ACHARJYA on 18 Nov 2019 at 9:58
 Accepted Answer

set(gca,'XTick',1:1:4)

  1 Comment

Thank ypu very much Kalyan.

Sign in to comment.