Interpolating 2D matrix

조회 수: 7 (최근 30일)
Jim Parsons
Jim Parsons 2017년 10월 13일
댓글: Matt J 2017년 10월 14일
I am trying to interpolating the matrix below. I would like to end up with an n by 3 matrix, and so my interpolation needs to be done row-wise
matrix = [221 188 0
215 201 0
210 213 0
197 231 0
162 236 0
125 225 0
78 199 0
74 196 0
49 144 48
46 125 83
44 93 127
50 48 173
57 0 202
60 0 216];
  댓글 수: 3
Jim Parsons
Jim Parsons 2017년 10월 14일
Assuming that it can be made monotonic, how would I proceed ?
Star Strider
Star Strider 2017년 10월 14일
Making the second column monotonic would necessarily make the first column non-monotonic. The second column also has duplicate values in the last two rows (as depicted in your Question), again destroying the monotonicity of the column.
I see no specific solution.

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

답변 (1개)

Matt J
Matt J 2017년 10월 14일
INTERP1 will do column-wise interpolation. You can apply it to the transpose of your matrix.
  댓글 수: 2
Jim Parsons
Jim Parsons 2017년 10월 14일
Thanks Matt J and Star Strider, with a few adjustments and using interp1 it worked.
Matt J
Matt J 2017년 10월 14일
Glad to hear, but please click "Accept" if that's the case.

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

카테고리

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