naninterp

One dimensional Interpolation over NaNs.

이 제출물을 팔로우합니다

One-line logically-indexed call to matlab function "interp1"

Fill nan-holes, fast and easy.

>> x = [1 2 NaN NaN 5 6];
>> naninterp(x)

ans =

1 2 3 4 5 6

Cubic interpolation by default, you should know how to change that :-)

--------------------------------------------------------------------------
function X = naninterp(X)
% Interpolate over NaNs
X(isnan(X)) = interp1(find(~isnan(X)), X(~isnan(X)), find(isnan(X)), 'cubic');
return
--------------------------------------------------------------------------

인용 양식

E. Rodriguez (2026). naninterp (https://kr.mathworks.com/matlabcentral/fileexchange/8225-naninterp), MATLAB Central File Exchange. 검색 날짜: .

도움

도움 준 파일: interp1gap, repnan

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0

added keywords