Plot values exception [x1 x2 x3 ...]
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Akzeptierte Antwort
the cyclist
am 31 Okt. 2012
Bearbeitet: the cyclist
am 31 Okt. 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')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!