Filter löschen
Filter löschen

resample no longer accepts NaN?

3 Ansichten (letzte 30 Tage)
Luke S
Luke S am 13 Mai 2020
Beantwortet: Jonas_Carlson am 3 Sep. 2020
Hi,
I just updated to 2020a and am getting an error resampling a vector containing NaNs. This seems new, but the help still says resample accepts NaNs. For example,
resample([1:100,NaN,NaN,NaN],2,1)
used to produce an output in 2016b, now produces an error on input check of upfirdn.m:
Error using upfirdn>validateinput (line 101)
The input signal X must be a double-precision vector.
Error in upfirdn (line 81)
[p,q] = validateinput(x,h,varargin);
Error in resample>uniformResample (line 271)
y = upfirdn(x,h,p,q);
Error in resample (line 112)
[varargout{1:max(1,nargout)}] = uniformResample(inputArgs{:});

Antworten (2)

Jonas_Carlson
Jonas_Carlson am 3 Sep. 2020
If you haven't already - install the update(s) to R2020a. This has been fixed, and resample works as before.

Rik
Rik am 13 Mai 2020
This is an undocumented change. Apart from a non-code addition at the end of the file, line 100 and 103 now include an isfinite check.
I have never used this function, but as the release notes state support was added for code generation I guess it has something to do with that.
I am not fully familiar with the bug reporting customs, but you might consider reporting this. If it is intentional they should probably edit the documentation. If not, they should revert this edit.

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by