git-svn-id: http://moon:8086/svn/matlab/trunk@153 801c6759-fa7c-4059-a304-17956f83a07c
18 lines
609 B
Matlab
Executable File
18 lines
609 B
Matlab
Executable File
% ##################################################################################
|
|
% ## Funktion: lper.m; Berechnung des Periodogramms ##
|
|
% ##################################################################################
|
|
%
|
|
% function Sxx = lper(x[,NFFT])
|
|
%
|
|
% Schaetzung der spektralen Leistungsdichte mittels Periodogramm
|
|
% x Datenfolge (Zeilen- oder Spaltenvektor)
|
|
% [NFFT] FFT-Laenge (optional)
|
|
|
|
function Sxx = lper(x,NFFT)
|
|
|
|
N = length(x);
|
|
if nargin<2, NFFT=pow2(nextpow2(N)); end;
|
|
X = fft(x,NFFT);
|
|
Sxx = (abs(X).^2)./N;
|
|
% ##### EOF #####
|