MATLAB: periodogram Showing Error "Invalid Value for Data" for Certain Input -
i trying use command periodogram
in matlab 15a.
my periodogram code:
periodogram(ts_outside)
when replace ts_outside
ts_inside
, working. above code, showing following set of errors (please note errors in in-built files of matlab):
error using dspdata/validatedata (line 14) invalid value data. data must vector or matrix containing real, positive values. error in dspdata.abstractps/validatedata (line 8) dspdata.validatedata(this,data); error in dspdata.abstractfreqresp/initialize>validate_data (line 77) validatedata(this, data); error in dspdata.abstractfreqresp/initialize (line 23) [data, datalen] = validate_data(this, data); error in dspdata.psd (line 82) initialize(this,varargin{:}); error in periodogram (line 197) hdspdata = dspdata.psd(pxx,w{:},'spectrumtype',options.range);
i have checked imaginary values in ts_outside
, using command imag
. following result of that:
any(imag(ts_outside)) ans = 0
as can see, imaginary part has no non-zero element.
i don't know problem variable. 33119x1 matrix, ts_inside
. also, same set of errors showing when try use crosscorr
on it. possible source of error?
also, check if there nan
element in ts_outside
vector:
any(isnan(ts_outside))
Comments
Post a Comment