|
|
| File Information |
| Description |
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
-------------------------------------------------------------------------- |
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (11) |
| 20 Jan 2013 |
Shmuel
|
|
|
| 22 Jun 2012 |
Ashley
|
|
|
| 13 Apr 2012 |
Joel
|
|
|
| 21 Feb 2010 |
Tina Hegarty
|
|
|
| 27 Feb 2009 |
David D
|
|
|
| 20 Jan 2009 |
Deepak Trivedi
|
|
|
| 13 Oct 2008 |
Girts Murans
|
|
|
| 30 Jun 2008 |
Carlos Adrian Vargas Aguilera
|
|
|
| 26 Jun 2008 |
Yasmin M
|
|
|
| 29 Nov 2005 |
moose o'donnell
|
|
|
| 06 Oct 2005 |
ho ge
|
|
|
| Updates |
| 01 Dec 2005 |
added keywords |
|
Contact us