When does 'interp1' function give 'The grid vector must contain unique points' error?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 29 Déc 2016
Réponse apportée : MathWorks Support Team
le 29 Déc 2016
When does 'interp1' function give 'The grid vector must contain unique points' error?
Réponse acceptée
MathWorks Support Team
le 29 Déc 2016
This error comes when there are duplicate points in input to 'interp1'.
You can remove duplicates using 'unique' function.
Example:-
>> [x, index] = unique(x);
>> yi = interp1(x, y(index), xi);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interpolation 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!