Interpolation with nearest neighbor for model evaluation | Nearest interpolation MATLAB
Hiall!Ihavetoevaluatethesimulatedvaluesfromanumericalmodel(attached.csv),comparingthemwithactualmeasurementsfromweatherstation(.txt).Asyoucanseeinthecsvfile,themodeledvaluesarehourly,whilethetime-stepintxtisdifferent.WhatIwanttodoiscomparethenearestvaluetime-wisefromtheactualmeasurement(txt)withtherespectivevaluefromcsv,eg.csv00.00correspondstotxt00.00,andnottxt00.50.Tomyunderstanding,thiswillhappenwithyi=interp1(x,Y,xi,nearest).HoweverIfailtounderstandtowhichcolumnsx,Yandxicorrespond.Sorryf...
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.