When does 'interp1' function give 'The grid vector must contain unique points' error?
17 ビュー (過去 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!