how to find and mark the value of local minimums in a graph of multiple data ?
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    reema shrestha
 el 15 de Feb. de 2018
  
    
    
    
    
    Respondida: Chris Turnes
    
 el 15 de Feb. de 2018
            I have a graph of multiple data taken experimentally. Now I want to find the troughs of the graph. I want to show the value of local minimas in the graph. How do I do it?

0 comentarios
Respuesta aceptada
  Birdman
      
      
 el 15 de Feb. de 2018
        Try this:
x=randi([1 7],1,10);
y=randi([3,10],1,10);
plot(x);hold on;plot(y);
[~,idxX]=findpeaks(-x);
[~,idxY]=findpeaks(-y);
plot(idxX,x(idxX),'o');plot(idxY,y(idxY),'o')
hold off;
2 comentarios
Más respuestas (1)
Ver también
Categorías
				Más información sobre 2-D and 3-D Plots 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!