energy of a signal in t and f domain
5 次查看(过去 30 天)
显示 更早的评论
The energy of a signal is expected to be the same in t and f domain.
n = 1e4;
dx = 0.25;
x = rand(n,1) -0.5;
ex = sum(x.^2) *dx; % energy in t domain
y = fft(x);
fs = 1/dx;
df = fs/n;
ya = abs(y);
ey = sum(ya.^2) *df; % energy in f domain
but from the code, ey/ex=16, exactly the squared fs.
what's the problem?
0 个评论
采纳的回答
Star Strider
2014-12-3
You need to normalise the fft by dividing it by the length of the signal:
y = fft(x)/length(x);
See the documentation for fft for details.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!