plot for a part of x
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
alpedhuez
el 11 de Jul. de 2020
Respondida: Star Strider
el 11 de Jul. de 2020
I have a plot for the date from 2001 to 2020. I now just want to plot for the data between 2019 and 2020. What will be a simpler way to do this?
0 comentarios
Respuesta aceptada
Star Strider
el 11 de Jul. de 2020
Experiment witth this example:
dt = datetime([2001 01 01])+calmonths(0:(2021-2001)*12); % ‘datetime’ Vector
y = rand(size(dt)); % Random Vector
figure
plot(dt,y)
xlim([datetime([2019 01 01]) datetime([2020 12 31])]) % Define Plot Limits
.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Calendar en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!