Multitaper spectral estimation (pmtm.m)

조회 수: 5 (최근 30일)
Max
Max 2015년 8월 5일
답변: Brian Neiswander 2015년 8월 20일
Hi,
I was trying to use pmtm function but oddly it gives error. I have been using it a few months ago with no problem. Has anybody experienced something similar? Even with MATLAB example i cannot make it (tried in both 2013b and 2015a):
n = 0:319;
x = cos(pi/4*n)+randn(size(n));
pxx = pmtm(x);
The error is:
Error using dpss
Too many output arguments.
Error in pmtm>getEV (line 526)
[E,V] = dpss(N,NW);
Error in pmtm>parseinputs (line 365)
[E,V,NW,indx,nfft_temp,varargin] = getEV(N,varargin{:});
Error in pmtm (line 152)
params = parseinputs(x,varargin{:});
Anybody, any idea please?

채택된 답변

Brian Neiswander
Brian Neiswander 2015년 8월 20일
I was able to run the code you posted in R2015a without an error. The error you see may be caused by a local "dpss" function that is interfering with the "dpss" function in MATLAB's Signal Processing Toolbox. Run the following statement in your MATLAB command window:
>> which dpss
The output should display a location inside the Signal Processing Toolbox folder, such as:
<matlabroot>\toolbox\signal\signal\dpss.m
where <matlabroot> is the output of:
>> matlabroot
If the location is not inside the Signal Processing Toolbox folder then there is a local function that is causing the problem. In this case, you can either rename the local "dpss" function or move it out of your MATLAB path.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Estimation에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by