plot for a part of x
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
alpedhuez
le 11 Juil 2020
Réponse apportée : Star Strider
le 11 Juil 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 commentaires
Réponse acceptée
Star Strider
le 11 Juil 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calendar dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!