Envelope extraction of a time domain signal
1 回表示 (過去 30 日間)
古いコメントを表示
I have a signal like this: t=[-10*10^(-9):0.0001*10^(-9):10*10^(-9)]; dt=394*10^(-15); betaL=1.2378*10^(-21); tao=15*10^(-12); i=0.5*exp(-(t./betaL.*dt).^2./(4*log(2))).*(1+cos(tao.*t./betaL)); I want to get its envelop so I tried Hilbert Transformation in this way: Y = hilbert(i); am = abs(Y); but it is not what I want, I want the envelope that goes through the peaks smoothly. Is there anybody know about this problem? Thank you very much!
CODE: t=[-10*10^(-9):0.0001*10^(-9):10*10^(-9)]; dt=394*10^(-15); betaL=1.2378*10^(-21); tao=15*10^(-12); i=0.5*exp(-(t./betaL.*dt).^2./(4*log(2))).*(1+cos(tao.*t./betaL)); Y = hilbert(i); am = abs(Y); plot(t,i,t,am)
0 件のコメント
採用された回答
Mark Schwab
2018 年 1 月 26 日
If you are not concerned with the length of the envelope signal you can use the "findpeaks" function.
[pks, locs] = findpeaks(i); % Where pks is a vector with amplitude of peaks and locs is a vector of peak indeces
envelope = interp(pks,floor(length(i)/length(pks)); % Interpolate peaks to vector close in size to i
Please note that the interpolation function only works with integer multiples of length so this will not produce an envelope vector equal in size to the original signal. You can refer to the following MATLAB answers post for more information on this:
Also, I have included a link to the findpeaks function documentation for your convenience:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で 描述性统计量 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!