When does 'interp1' function give 'The grid vector must contain unique points' error?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 29 Dic 2016
Risposto: MathWorks Support Team
il 29 Dic 2016
When does 'interp1' function give 'The grid vector must contain unique points' error?
Risposta accettata
MathWorks Support Team
il 29 Dic 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!