how do I annote a vector on a signal plot

1 vue (au cours des 30 derniers jours)
fadams18
fadams18 le 14 Oct 2022
Commenté : fadams18 le 14 Oct 2022
Hello guys,
So i have a signal plot. and then I have a vector that are indexes to some particular events in this signal.
So I want to plot this vector also on my signal. Ideally I want it to look something like in the image below.
The orange is my signal. so assuming I have a vector I want to annote it as shown in the violet crosses.
Note: The crosses dont depend on the y axis.

Réponse acceptée

KSSV
KSSV le 14 Oct 2022
A = rand(1,100) ;
idx1 = find(A>0.7) ;
idx2 = find(A<0.4) ;
plot(A,'b')
hold on
plot(idx1,0.8,'+r')
plot(idx2,0.2,'+k')
  1 commentaire
fadams18
fadams18 le 14 Oct 2022
awesome, got the idea. thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line 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