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 Center および MATLAB AnswersNaNs についてさらに検索
謝辞

ヒントを与えたファイル: 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