energy of a signal in t and f domain
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ray Lee
am 3 Dez. 2014
Kommentiert: Ray Lee
am 5 Dez. 2014
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 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Dez. 2014
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.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!