peak finding of a graph
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ARPITA MONDAL
el 27 de Jul. de 2020
Editada: ARPITA MONDAL
el 27 de Jul. de 2020
I am attaching the x and y data vector here. Whenever I am using findpeaks command for findind the peaks
x=V1_1_new
y=y1_1_new
findpeaks(y1_1_new,V1_1_new)
I am getting this error
Error using findpeaks
Expected X to be increasing valued.
Error in findpeaks>parse_inputs (line 215)
validateattributes(Xin,{'double'},{'real','finite','vector','increasing'},'findpeaks','X');
Error in findpeaks (line 134)
= parse_inputs(Yin,varargin{:});
How can I solve this error
0 comentarios
Respuesta aceptada
KSSV
el 27 de Jul. de 2020
load("matlab_peak.mat") ;
x=V1_1_new ;
y=y1_1_new ;
[pks,idx] = findpeaks(y) ;
plot(x,y)
hold on
plot(x(idx),y(idx),'*r')
1 comentario
Más respuestas (1)
Serhii Tetora
el 27 de Jul. de 2020
x=V1_1_new;
y=y1_1_new;
[pks, locs] = findpeaks(y);
plot(x,y,x(locs),pks,'o')
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!