Hi all!
I have a list of stations (see .txt) and a .csv (see attached) with several data. What I need to do is scan the entire .txt and for every station, eg. Airport, to go and scan column 14 of the .csv. If the station is the same, I want to do several things, eg. extract the date (column 2) and Temperature (column 15) every time Airport appears.
I tried with eq but it doesn't work.
list1 = rdir ('C:\Projects\LIFE ASTI\C.3\C.3\Weather station data\from desktop\Obs. data 4 Keppas\'); wrfdir = 'C:\Projects\LIFE ASTI\C.3\C.3\Weather station data\from desktop\2019 run\Thess\*.csv';stations = readtable('C:\Projects\LIFE ASTI\C.3\C.3\Weather station data\from desktop\Stations coordinates.txt'); output_path='C:\Projects\LIFE ASTI\C.3\C.3\Weather station data\from desktop\OutputSimulations';WRF_Data = readtable('C:\Projects\LIFE ASTI\C.3\C.3\Weather station data\from desktop\2019 run\Thess\THESS_Temp.csv');% Variables
vars={'Temperature'; 'Relative humidity'};years = {'2015'; '2019'};varunits={'Celsius'; '%' };%Starting loop for all files
for i=1:size(stations,1) for k = 1:size(WRF_Data.Station,1) if eq(stations(i,1) , WRF_Data.Station(k,1)) KEEP TEMPERATURE OR WHATEVER... end endend
Best Answer