2d extrapolation to replace NaN in corners

조회 수: 24 (최근 30일)
Leon Thürnau
Leon Thürnau 2022년 8월 26일
편집: Leon Thürnau 2022년 8월 30일
Hi !
I'm trying to do 2d extrapolation for my table in matlab.
I have a matrix with 101x101 values and corresponding axes with 1x101 and 101x1 values.
Now my problem is the following:
The corners of the matrix are containing NaN values which I want to replace with extrapolated values of the given data.

채택된 답변

Matt J
Matt J 2022년 8월 26일
One option is fillmissing.
There are also offerings on the File Exchange, e.g.,
  댓글 수: 3
Leon Thürnau
Leon Thürnau 2022년 8월 30일
편집: Leon Thürnau 2022년 8월 30일
Update: "Linear" with dim = 2 seems so solve my problem !
Matt J
Matt J 2022년 8월 30일
Glad to hear it, but since fillmissing worked, please Accept-click the answer.

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

추가 답변 (1개)

Star Strider
Star Strider 2022년 8월 26일
The fillmissing function may do what you want.
Try something like this —
M = NaN(5);
M([3 (7:9) 11:15 (7:9)+10 23]) = randi(9, 1, 13)
M = 5×5
NaN NaN 4 NaN NaN NaN 6 6 2 NaN 2 6 1 6 4 NaN 5 9 4 NaN NaN NaN 2 NaN NaN
Mfm = fillmissing(M, 'nearest')
Mfm = 5×5
2 6 4 2 4 2 6 6 2 4 2 6 1 6 4 2 5 9 4 4 2 5 2 4 4
.

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by