1-D interpolation along specified dimension

Hello, I have a tall 2-D matrix 6037500x44. I want perform an interpolation of all the 6037500 rows, using the 44 sample points and 301 query points. It is basically a 1-D interpolation along the second dimension. A for-loop row-by-row lasts forever. Can anybody suggest a more efficient way? Thanks!

 採用された回答

dpb
dpb 2017 年 2 月 10 日

1 投票

Not sure who's the independent x value but seems like the vectorized form should work
xout=interp1(x,data.',xq);
where x is the independent variable range commensurate with the range of the data over the 44 columns consistent with xq, the 301-length interpolating points.

2 件のコメント

Giorgio Trumpy
Giorgio Trumpy 2017 年 2 月 13 日
This is exactly what I was looking for. Thanks a lot, Giorgio
Serge
Serge 2022 年 4 月 14 日
What if its 3rd or higher dimentions? Is there ay way to avoid using permute, since its a bit ugly.

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

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

2017 年 2 月 10 日

コメント済み:

2022 年 4 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by