convert a x y z data(1D) to MxN matrix without having NaN values in Z matrix?

조회 수: 1 (최근 30일)
nilutpal Bora
nilutpal Bora 2022년 6월 25일
답변: the cyclist 2022년 6월 25일
I have a XYZ sattered data all are having same number of elements and are 1D. While interpolating, I get MxN matrix for X Y Z; but Z has some NaN value outside the scattered data boundary. I don't want to violet the surface, what to do?
  댓글 수: 1
KSSV
KSSV 2022년 6월 25일
Show us your data and code. If the data lies outside, it comes under extrapolation and we cannot trust the extrapolated result.

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

답변 (1개)

the cyclist
the cyclist 2022년 6월 25일
If you are using interp3 (or related functions), extrapolated values will automatically be set to NaN, for some interpolation methods (e.g. the default linear interpolation). This makes sense for methods that rely on calculating values in between two endpoints.
See that documentation link for methods that will allow for non-NaN extrapolation.

카테고리

Help CenterFile Exchange에서 Interpolation of 2-D Selections in 3-D Grids에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by