Interpolation between 2 data sets acquired at same grids

8 ビュー (過去 30 日間)
maryam al labbad
maryam al labbad 2021 年 2 月 12 日
コメント済み: maryam al labbad 2021 年 2 月 14 日
Hi,
I have two data sets, that are sampled at same height (y axis) (see image) and I would like to obtain the data set in between by interpolation. I tried interp1 but it is not working for me. I used to do interplation to obtain points at different height in the same profile, but when I try to interpolate to abtain the data points in between 2 different profiles at the same heights, it is not working. Any help would be appreciated.
  2 件のコメント
darova
darova 2021 年 2 月 13 日
Did you try to interpolate in X direction (horizontally)?
Please provide your code
maryam al labbad
maryam al labbad 2021 年 2 月 13 日
U_3_I = interp1(Height, profile,newHeight);
I used to use this code to obtain the data point at different height in the profile.
I tried using this,
U_3_I = interp1(profile1, profile2,Height);
but this does not work. Can you explain how to interpolate in X direction?

サインインしてコメントする。

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 2 月 13 日
"when I try to interpolate to abtain the data points in between 2 different profiles at the same heights, it is not working"
If both data sets share the same Y value, then the result of interpolation is just going to be the average of their X values. No need to use interp for this. Just use mean.
  9 件のコメント
maryam al labbad
maryam al labbad 2021 年 2 月 14 日
Actually, what you mentioned at the begining about averaging is correct. my two data set have the same y value, and thus, interpolation gives the same answer as averaging. I think I have made a mistake somewhere which casued the answer to be different.
maryam al labbad
maryam al labbad 2021 年 2 月 14 日
Thank you so much for youe help

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by