필터 지우기
필터 지우기

2D matrix interpolation

조회 수: 14 (최근 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 CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by