resample no longer accepts NaN?
12 views (last 30 days)
Show older comments
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{:});
0 Comments
Answers (2)
Jonas_Carlson
on 3 Sep 2020
If you haven't already - install the update(s) to R2020a. This has been fixed, and resample works as before.
0 Comments
Rik
on 13 May 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.
0 Comments
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!