# fillgaps

##

Last updated Sun Sep 19 14:20:27 1999

Fill gaps within a vector

## 1. SYNOPSIS

v = fillgaps(v, imeth, extrapol )

## 2. DESCRIPTION

Gaps within a vector are NaN data. Data gaps inside the elements of the vector are filled using interpolation function interp1, and the method specified by imeth. If extrapolation is required, then gaps at the beginning and end of the vector are filled with the nearest non-NaN value.

## 3. PARAMETERS

v

  Data vector.

imeth

  Interpolation method,as those used for interp1. If zero,then default method linear is used.

extrapol If non-zero then also extrapolate data at the vector extremities.

## 4. RETURNS

v

  Data vector with gaps filled.

## 5. AUTHORS

Pierre Jaccard, Geophysical Institute, University of Bergen, 1999