The most efficient way to interpolate

Hello everyone!
Lets assume I have been given 2x60 matrix consisting of X and corresponding Y values. Of these values I have computed the picture below.
What is the most efficient way to approximate(interpolate) the value between those data points (circles), I have been given a long vector containing a bit over million values of X on the range of 10-14. How would you find(approximate) the corresponding Y values if you were given a million random numbers of X in the range from 10 to 14?

 採用された回答

the cyclist
the cyclist 2017 年 2 月 14 日

0 投票

Have you tried using interp1?

5 件のコメント

Valkmi
Valkmi 2017 年 2 月 16 日
Hey! Thank you for the quick reply. Works with the data set I pictured before but gives an error when given data points are not strictly monotonic increasing. What would be the most efficient way to interpolate values given the data points pictured below.
Adam
Adam 2017 年 2 月 16 日
The y values should not need to be monotonically increasing, but the x values do. I don't see any decreasing x values there, but it is hard to tell.
Valkmi
Valkmi 2017 年 2 月 16 日
Oh you're right :s I'm so beginner at this. The original problem was actually defined very poorly as I actually need to interpolate the X values given like a million values of Y.
Valkmi
Valkmi 2017 年 2 月 16 日
And now I realized that it is actually impossible.
Valkmi
Valkmi 2017 年 2 月 16 日
I'll accept your answer as it was a proper solution to my problem first. Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

質問済み:

2017 年 2 月 14 日

コメント済み:

2017 年 2 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by