Plot values exception [x1 x2 x3 ...]

조회 수: 1 (최근 30일)
Rafael Freire
Rafael Freire 2012년 10월 31일
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