When does 'interp1' function give 'The grid vector must contain unique points' error?
조회 수: 11 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2016년 12월 29일
답변: MathWorks Support Team
2016년 12월 29일
When does 'interp1' function give 'The grid vector must contain unique points' error?
채택된 답변
MathWorks Support Team
2016년 12월 29일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!