Multitaper spectral estimation (pmtm.m)
조회 수: 5 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!