Finding two minimum Values in a graph?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am trying to find two points on the graph, I've searched around but could not find anything specific relating to what I am searching, I am trying to find two X values on the graph of both signals at both points when they're at the lowest in respect to yaxis, I have been trying to generate a code for one, this is what I got so far. Thanks in advance..

indexmin = find(min(laserC) == laserC);
xmin = T(indexmin)
ymin = laserC(indexmin)
indexmax = find(max(laserC) == laserC);
xmax = T(indexmax)
ymax = laserC(indexmax)
output:
xmin =
27.2940
27.3860
ymin =
1.0195
1.0195
But I would like also know how to determine the other xmin value which would be around 30ish.
0 commentaires
Réponses (1)
Star Strider
le 1 Mai 2017
Modifié(e) : Star Strider
le 1 Mai 2017
Use the Signal Processing Toolbox findpeaks function with the negative of laserC’:
[pks,pkt] = findpeaks(-laserC, T);
pks = -pks; % Correct Amplitudes
The times ‘pkt’ do not need to be corrected.
See the documentation on findpeaks for all the details.
0 commentaires
Voir également
Catégories
En savoir plus sur Audio Processing Algorithm Design 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!