Plot values exception [x1 x2 x3 ...]

1 vue (au cours des 30 derniers jours)
Rafael Freire
Rafael Freire le 31 Oct 2012
I have x=1:100 and xx=[2 5 8 13 14 25 46 78 97 99] (whatever)
How to plot(x, '.b') (or scatterplot) to suppress xx values on x

Réponse acceptée

the cyclist
the cyclist le 31 Oct 2012
Modifié(e) : the cyclist le 31 Oct 2012
Assuming you mean that xx refers to the indices (i.e. locations in x, not the values of x), then this should work:
indicesToInclude = setdiff(1:100,xx);
plot(x(indicesToInclude),'.b')

Plus de réponses (0)

Catégories

En savoir plus sur Discrete Data Plots 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!

Translated by