Plot values exception [x1 x2 x3 ...]

1 次查看(过去 30 天)
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

采纳的回答

the cyclist
the cyclist 2012-10-31
编辑:the cyclist 2012-10-31
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 个)

类别

Help CenterFile Exchange 中查找有关 Discrete Data Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by