2D matrix interpolation

10 ビュー (過去 30 日間)
Sandeep Parameshwara
Sandeep Parameshwara 2020 年 2 月 4 日
回答済み: Sandeep Parameshwara 2020 年 2 月 5 日
Hello,
This could be very basic question. But , all my attempts have been in vain may be because I haven't really understood interp functions in MATLAB. I have 2 matrices .
A1=[1 2 3;4 5 4; 7 8 9];
A2=[1 0.6 8;5 8 9;11 32 2];
A1 is at coordinate (-1,-1) and A2 is at the coordinate (-1,1) in 2D grid. I need the interpolated value at (-1,0). How can I do this? Should I be using interp1?
Thanks for the help
  2 件のコメント
darova
darova 2020 年 2 月 4 日
I don't understand. What matrices represents? What does it mean "matrix at coordinate"
Sandeep Parameshwara
Sandeep Parameshwara 2020 年 2 月 5 日
Hi, I could do it (Please see the solution below)

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

採用された回答

Sandeep Parameshwara
Sandeep Parameshwara 2020 年 2 月 5 日
A1=[1 2 3;4 5 4; 7 8 9];
A2=[1 0.6 8;5 8 9;11 32 2];
V = [reshape(A1,1,[]);reshape(A2,1,[])];
Vq = interp1([-1;1],V,0);
A3=reshape(Vq,size(A1));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by