I am using the built in function emd(x), but I can't get the time periode I used for the signal, instead there are samples on the x-axis.
Can anyone help me with assigning time vector on the x-axis for emd?
Thanks in advance,

Réponses (1)

Mathieu NOE
Mathieu NOE le 11 Mai 2021
hello
if you know your sampling frequency (Fs) of the original data , and the length of the data , it's fairly straithforward :
dt = 1/Fs;
time = (0:samples-1) * dt;

5 commentaires

Jan Ali
Jan Ali le 11 Mai 2021
Thanks Mathieu for the answer. I know the Fs and data length, but how can I plot the actual time in emd?
Mathieu NOE
Mathieu NOE le 11 Mai 2021
hello
can you share your code ?
tx
Jan Ali
Jan Ali le 11 Mai 2021
Modifié(e) : Jan Ali le 12 Mai 2021
load(iHall); % a data file containing the signal
fs = 15384;
x = iHall(length(iHall)/900*726:length(iHall)/900*728); % Select part of signal (current waveform ) where transient occured
t = (0:length(x)-1)/fs + 726; % sample starts from 726s instead of 5083s
[imf,residual,info] = emd(x,'Interpolation','pchip','Display',1);
emd(x);
Jan Ali
Jan Ali le 16 Mai 2021
Hello Mathieu again,
I am looking forward to getting your kind answer.
Thanks in advance,
Mathieu NOE
Mathieu NOE le 16 Mai 2021
hello Jan
I thought the topic has already been answered - in another post (about the same exact question ??)

Connectez-vous pour commenter.

Question posée :

le 10 Mai 2021

Commenté :

le 16 Mai 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by