Interpolation between two surfaces with same grid

조회 수: 2 (최근 30일)
Jakob Dotter
Jakob Dotter 2019년 12월 19일
답변: Cameron B 2019년 12월 28일
I have two different matrices (or surfaces) of the same size which also use the same XY grid. I want to interpolate between these two matrices to create another matrix. Since they already have the same grid I don't how I could apply the 'interp' command to this problem.
But to me it is very important to be able to chose the inter- and extrapolation method.
A simple example:
[x,y] = meshgrid(-4:4,-4:4);
M1 = magic(4)./4;
M2 = fliplr(M1)-4;
  댓글 수: 2
darova
darova 2019년 12월 19일
  • I want to interpolate between these two matrices to create another matrix
Please explain more precisely
darova
darova 2019년 12월 28일
What you are trying to achieve is still unclear for me. Maybe you have a picture of the result you want to get?
123.png

댓글을 달려면 로그인하십시오.

답변 (1개)

Cameron B
Cameron B 2019년 12월 28일
Try using the interp3 function.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by