Change in behavior of filtfilt function between 2016b and 2019b?

3 views (last 30 days)
Hello,
I developed some signal processing code using Matlab 2016b, and a colleague is getting an error trying to use it on Matlab 2019b. The code is supposed to bandpass filter the columns of a data matrix, some of which might contain all NaNs (having been previously removed for being poor quality data). On my version of Matlab, passing this matrix into filtfilt works fine, and the NaN columns just stay NaN. But on her version, she gets the error:
`Error using filtfilt
Expected input to be finite.
Error in filtfilt>efiltfilt (line 114)
validateattributes(x,{'double'},{'finite','nonempty'},'filtfilt');
Error in filtfilt (line 89)
y=efiltfilt(b,a,x);
I'm not able to reproduce this error with her data in my version of Matlab. The only thing I can do to get the same message is to literally type out validateattributes(dataMatrix,{'double'},{'finite','nonempty'},'filtfilt'), which suggests to me that my version of filtfilt is not executing that line of code? Has there been an update to the filtfilt function between 2016b and 2019b?
  3 Comments
Eloise Anguluan
Eloise Anguluan on 10 Mar 2021
Same here, a code I have been using for a long time gets this same error in my friend's PC running Matlab 2019b. Any updates from Matlab?

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 23 May 2022
Yes.
By R2020a x is explicitly documented as having to be finite valued. The code test was added in a previous release, but the document took time to be updated.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!