필터 지우기
필터 지우기

Plotting only few indices over time series

조회 수: 3 (최근 30일)
BR
BR 2021년 12월 15일
댓글: Mathieu NOE 2021년 12월 16일
Hi,
I wanted to highlighted with a different marker may be, over a plot only for a fewer indices over time series.
e.g. for a time series x having size(x) = 400 x 1
plot(x) first and highlight only set of indices y = [28,300,349,388,389] over the original curve.
I tried to find the solutions on mat exchange but couldn't. Any help would do please?

채택된 답변

Mathieu NOE
Mathieu NOE 2021년 12월 15일
hello
my 2 cents suggestion :
n = 1:500;
x = n.*(1+rand(size(n)));
ind = [28,300,349,388,389];
plot(n,x,'b',n(ind),x(ind),'dr','markersize',15);
  댓글 수: 2
BR
BR 2021년 12월 16일
Brilliant, thanks.
Mathieu NOE
Mathieu NOE 2021년 12월 16일
My pleasure !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by