Problem with psdesttype in pwelch function

조회 수: 4 (최근 30일)
fabio
fabio 2014년 6월 23일
댓글: Honglei Chen 2014년 6월 24일
Hi everyone,
I tried to use pwelch function to calculate PSD. I tried the example in the documentation:
Fs = 1000; t = 0:1/Fs:.296;
x = cos(2*pi*t*200)+randn(size(t));
pwelch(x,[],[],[],Fs,'twosided');
but i get the error :
Undefined function 'psdesttype' for input arguments of type 'cell'.
Anyone has an idea how to solve the problem? Matlab version is r2014a.
Thanks.

답변 (2개)

Honglei Chen
Honglei Chen 2014년 6월 23일
I couldn't reproduce this. Sounds like an installation problem. Do you have Signal Processing Toolbox installed? You can use
>> ver
to check that.

fabio
fabio 2014년 6월 24일
편집: fabio 2014년 6월 24일
Hi Honglei , thanks for your fast reply. I tried the code even on Matlab 2013a but i still get the error. This is another script i tried: (I checked DSP toolbox is version 8.4)
clear all;
Fs = 44100;
t = (0:1/Fs:1-1/Fs).';
x = sin(2*pi*t*200);
Nx = length(x);
nfft = Nx;
[Pxx2,Fx2] = pwelch(x,w,0,nfft,Fs);
the error is :
Undefined function 'psdesttype' for input arguments of type 'cell'.
Error in pwelch (line 142) [esttype, varargin] = psdesttype({'psd','power','ms'},varargin);
Error in prova (line 25) [Pxx2,Fx2] = pwelch(x,w,0,nfft,Fs);
  댓글 수: 1
Honglei Chen
Honglei Chen 2014년 6월 24일
DSP Toolbox and Signal Processing Toolbox are separate product but you should have Signal Processing Toolbox if you have DSP Toolbox. This looks like your installation is corrupted but you say you can reproduce it in two MATLABs. Could you see if you have psdesttype.m in your toolbox/signal/signal/private directory? if not, you may want to talk to the customer support.

댓글을 달려면 로그인하십시오.

카테고리

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