Finding two minimum Values in a graph?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 1 de Mayo de 2017
Editada: Star Strider
el 1 de Mayo de 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 comentarios
Ver también
Categorías
Más información sobre Audio Processing Algorithm Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!