Area of a Spectrum
Mostra commenti meno recenti
What matlab command can give me the area of a spectrum. I have shock response spectrum but i need to find the area under the curve.
Risposta accettata
Più risposte (1)
Wayne King
il 1 Ago 2012
Hi Lisa, If you have the Signal Processing Toolbox, you can use the avgpower() method of a spectrum object.
For example:
Fs = 1000;
t = 0:1/Fs:1-(1/Fs);
x = cos(2*pi*50*t)+sin(2*pi*100*t)+randn(size(t));
psdest = psd(spectrum.periodogram,x,'Fs',Fs,'NFFT',length(x));
avgpower(psdest,[25 75])
The final line above integrates under the PSD from 25 to 75 Hz.
Note you can get the fraction of the total power in the specified interval with:
avgpower(psdest,[25 75])/avgpower(psdest)
1 Commento
Lisa Justin
il 1 Ago 2012
Categorie
Scopri di più su Parametric Spectral Estimation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!