From: Edwin on
Hello Cris and Walter thanks for your concern,
@Cris, yes I wanted yi = interp1(M(1:22,2),M(1:22,1),0.0021); not
yi = interp1(M(1:22,1),M(1:22,2),0.0021);

@ walter, Sorry I mistyped it is actually as you wrote
9E-05.

I have worked around just by deleting the zeros values with "find" command, however I'm still curious if there is another more straight forward way of interpolating regardless if there are repeated values.

Regards
From: Cris Luengo on
"Edwin " <onest30(a)gmail.com> wrote in message <i1hsqd$1a0$1(a)fred.mathworks.com>...
> I have worked around just by deleting the zeros values with "find" command, however I'm still curious if there is another more straight forward way of interpolating regardless if there are repeated values.

I know what you mean, I've sometimes wanted to do the same. And it could work with nearest neighbor or linear interpolation, as long as you don't try to find the value at one of the repeats, but with other interpolation methods it just can't work. And more often than not, it's a user error rather than something you really want to do.

You can remove repeated values with the UNIQUE function, but you still need to decide what value to assign to your table for the repeats.

Cheers,
Cris.