How can I solve pmcov() error?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Signal Modeling finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!