"Invalid interpolation method" after moving to MATLAB2020b

16 vues (au cours des 30 derniers jours)
Yousef Dajani
Yousef Dajani le 20 Fév 2021
Commenté : Steven Lord le 10 Mar 2021
This code was working well using MATLAB2018a:
z_t = interp1(time,x,y,'splines')
In MATLAB2020b, it is showing these error:
Error using interp1>sanitycheckmethod (line 285)
Invalid interpolation method.
Error in interp1>parseinputs (line 393)
method = sanitycheckmethod(last);
Error in interp1 (line 112)
parseinputs(X,V,penultimate,last,nargin,ndataarg,pp);
  1 commentaire
Star Strider
Star Strider le 10 Mar 2021
Andrea Pirlo — See my Answer (and Vote for it if it solves your problem)!

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 20 Fév 2021
See method in the interp1 documentation (R2020b, however I doubt if it’s changed significantly since R2018b).
  4 commentaires
John D'Errico
John D'Errico le 20 Fév 2021
My guess is if it worked in the past, they changed something, making it slightly more picky.
The property has always been just 'spline' as far back as I can remember. Therefore, this was arguably a bug fix, making the code consistent with the documenttion, and as the docs have always been.
Steven Lord
Steven Lord le 10 Mar 2021
I would have to go back and check but I suspect the refactoring that improved performance in release R2020a brought with it stricter input argument checking.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by