naninterp

버전 1.0.0.0 (1.07 KB) 작성자: E. Rodriguez
One dimensional Interpolation over NaNs.
다운로드 수: 6.5K
업데이트 날짜: 2005/12/1

라이선스 보기

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 (2024). naninterp (https://www.mathworks.com/matlabcentral/fileexchange/8225-naninterp), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 NaNs에 대해 자세히 알아보기
도움

줌: interp1gap, repnan

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

added keywords