Interpolating Irregularly Spaced Data

Hi,
I have many sets of data, all are 2D arrays, where the first column is a depth and the second column is a reading taken at that corresponding. My problem is that I would like to interpolate the data so I have a grid of readings (col 2) for increments of 0.1 depth (col 1). The depth data in col 1 is irregularly sampled and is not the same for each set of readings I have taken. Linear interpolation would be preferable.
Any Help would be greatly appreciated,
Tom

回答 (1 件)

Grzegorz Knor
Grzegorz Knor 2011 年 10 月 19 日

0 投票

Use interp1 function:
interp1(col1,col2,col1(1):.1:col1(end))

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

質問済み:

Tom
2011 年 10 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by