How can I solve pmcov() error?

조회 수: 5 (최근 30일)
cami
cami 2018년 5월 29일
the function code is:
function [ Pxx ] = ARPMCOV (A,p )
[H,F] = freqz(1,A,[],1);
plot(F,20*log10(abs(H)))
xlabel('Frequency (Hz)')
ylabel('PSD (dB/Hz)')
rng default
x = randn(1000,1);
y = filter(1,A,x);
[Pxx,F] = pmcov(y,p,1024,1);
hold on
plot(F,10*log10(Pxx))
legend('True Power Spectral Density','pmcov PSD Estimate')
end
_____________________
Now, if I recall the function in the coomand window using for example: >> A=[-2 3 0,9 -1 2.3]; >> p=4; >> [ Pxx ] = ARPMCOV (A,p ) I have this errors: Error using arpest Expected X to be finite.
Error in arparest (line 38) validateattributes(x,{'numeric'},{'nonempty','finite','2d'},'arpest','X');
Error in armcov (line 37) [a,e,msg,msgobj] = arparest(x,p,'modified');
Error in arspectra (line 81) [a,v] = feval(method,x,p);
Error in pmcov (line 101) [Pxx,freq,msg,units,~,options,msgobj] = arspectra(method,x,p,varargin{:});
Error in ARPMCOV (line 15) [Pxx,F] = pmcov(y,p,1024,1);
thank you!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by