How to find a slope of signal if we do not know the value of x1, x2, y1, y2
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Matlaber
el 13 de Feb. de 2019
Comentada: Star Strider
el 18 de Feb. de 2019
How can we find the slope of a signal if we do not know the value of x1, x2, y1, y2
which we cannot use
Slope = (y2 - y1) / (x2 - x1);
Example:
load sunspot.dat
year = sunspot(:,1);
avSpots = sunspot(:,2);
[pks,loc]=findpeaks(avSpots,year, 'Annotate','extents','WidthReference','halfheight')
axis([1700 1711 0 100])
give a graph of
Thank you
0 comentarios
Respuesta aceptada
Star Strider
el 13 de Feb. de 2019
I am not certain what you intend by ‘slope of a signal’. You can easily determine the derivatives of the signal with the gradient (link) function.
6 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!