Interpolation with nearest neighbor for model evaluation

1 回表示 (過去 30 日間)
Daphne PARLIARI
Daphne PARLIARI 2020 年 2 月 11 日
コメント済み: Rik 2020 年 2 月 13 日
Hi all!
I have to evaluate the simulated values from a numerical model (attached .csv), comparing them with actual measurements from weather station (.txt). As you can see in the csv file, the modeled values are hourly, while the time-step in txt is different. What I want to do is compare the nearest value time-wise from the actual measurement (txt) with the respective value from csv, eg. csv 00.00 corresponds to txt 00.00, and not txt 00.50.
To my understanding, this will happen with
yi = interp1(x,Y,xi,'nearest').
However I fail to understand to which columns x,Y and xi correspond. Sorry for the trivial question but I am totally confused.
  1 件のコメント
Rik
Rik 2020 年 2 月 13 日
You have some work to do before you start thinking about interpolation. First you should read your data to variables with an appropriate data type. Parse the date and time codes to datetime. That will also make it a lot easier to line up your two data sets.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeWeather and Atmospheric Science についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by