MATLAB Answers

0

How to skip time on X axis

Asked by ANKUR KUMAR on 22 Dec 2017

I am trying to plot a variable for January and July months.

A=randi(25,1,62);
T1 = datetime(2017,01,1):datetime(2017,01,31);
T2 =datetime(2017,07,1):datetime(2017,07,31);
T=[T1 T2];
plot(T,A)

T has the dates of January and July only. But when I plot T vs A (any data), then the Feb-June also comes up on X axis. How to skip in between dates on X axis. I have attached the plot.

  0 Comments

Log in to comment.

Tags

0 Answers

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today