When does 'interp1' function give 'The grid vector must contain unique points' error?
16 次查看(过去 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!