Extracting data from a signal
Mostrar comentarios más antiguos
my signal is a single column vector (I have attached an image how the signal looks like), I want to extract data from this vector from whenever the signal starts rising until it reaches the peak for each iteration and saving corresponding data from each iteration in a new separate column vector. Any suggestions?
2 comentarios
Adam Danz
el 9 de Mzo. de 2020
Which one of these images (if any) indicate when the signal starts to rise?

In the first image, there are many tiny spike where the signal technically isn't monotonically rising.
Rahim Yousefi
el 9 de Mzo. de 2020
Respuesta aceptada
Más respuestas (1)
Hank
el 9 de Mzo. de 2020
Adam, I think the crosshairs in the first image are where the derivative becomes positive: the signal starts to rise. I would use this fact to cut the data programatically. First smooth the data and then take the derivative. The continguous regions where the derivative is positive are the regions you're looking for.
sig = load('signal'); % load
sig = sig(:); % column vector
sigsmooth = smooth(sig,100); % boxcar 100 smoothing
dsig = [0; diff(sig)]; % derivative, padded with 0 so the length doesn't change.
dsigrising = dsig>0; % this vector is true in the regions you want data.
Clustering the rising regions is not something I know how to do programatically, but maybe this could make the boundaries distinct enought that you could do it by hand.
Categorías
Más información sobre Beamforming and Direction of Arrival Estimation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




