Finding two minimum Values in a graph?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 1 Mag 2017
Modificato: Star Strider
il 1 Mag 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 Commenti
Vedere anche
Categorie
Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!