www.gusucode.com > signal 案例源码程序 matlab代码 > signal/MultitaperEstimateWithSamplingFrequencyExample.m
%% Multitaper Estimate with Sample Rate % Obtain the multitaper PSD estimate of a signal sampled at 1 kHz. The % signal is a 100 Hz sine wave in additive _N_(0,1) white noise. The signal % duration is 2 s. Use a time-halfbandwidth product of 3 and DFT length % equal to the signal length. % Copyright 2015 The MathWorks, Inc. fs = 1000; t = 0:1/fs:2-1/fs; x = cos(2*pi*100*t)+randn(size(t)); [pxx,f] = pmtm(x,3,length(x),fs); %% % Plot the multitaper PSD estimate. pmtm(x,3,length(x),fs)