resample no longer accepts NaN?

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{:});

답변 (2개)

Jonas_Carlson
Jonas_Carlson 2020년 9월 3일

1 개 추천

If you haven't already - install the update(s) to R2020a. This has been fixed, and resample works as before.
Rik
Rik 2020년 5월 13일

0 개 추천

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.

카테고리

제품

릴리스

R2020a

태그

질문:

2020년 5월 13일

답변:

2020년 9월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by