Error: Sample points must be unique and sorted in ascending order.

I have the following data. But when I am trying to interpolate it is giving
Error using matlab.internal.math.interp1
Sample points must be unique and sorted in ascending order.
Error in interp1 (line 154)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol)
Kindly help me out.
Thanks in advance.

 Accepted Answer

Matt J
Matt J on 24 Aug 2020
Edited: Matt J on 24 Aug 2020
You can use unique() to get rid of duplicate sample points. It will also sort them.

More Answers (0)

Categories

Products

Release

R2020a

Asked:

on 24 Aug 2020

Edited:

on 24 Aug 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!