Select values from a signal

2 vues (au cours des 30 derniers jours)
Julio Martín
Julio Martín le 28 Oct 2021
Commenté : Julio Martín le 29 Oct 2021
Hi, would like to find the way to identity an specific value from a signal (example on image 1).
This is an example of a signal after excute RMS.
At this moment, I need to take EMG values (y) from an specific moment of time (x).
For example, if I would like to take value from x point 1245, or 4567, How culd I code this?
Thank You

Réponse acceptée

Image Analyst
Image Analyst le 28 Oct 2021
Not sure if your x axis are real world units, or simply indexes. If they're indexes, simply refer to them:
y1 = y(1245);
y2 = y(4567);
If they're not indexes, but real world values, then you need to find the index that is closest to your desired x value. Once you have that index, you can extract the y value you want.
[~, index] = min(abs(x - 1245));
y1 = y(index);
  3 commentaires
Image Analyst
Image Analyst le 29 Oct 2021
Why do you not know how to find the index where x is closest to 1245? I specifically showed you how in my last comment. Again:
[~, index] = min(abs(x - 1245));
y1 = y(index);
Julio Martín
Julio Martín le 29 Oct 2021
It’s true,, really works Thank you very much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur AI for Signals dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by