How can I solve pmcov() error?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!