Extract data based on the name and month from the table

1 次查看(过去 30 天)
Hey, all,
I have a table (25560 x 12). I want to extract data from it based on the names (from station_name column) and month names (from date column). I want to save all results on the workspace as separate tables.
for example I want to save these in my workplace:
Ahvaz_Jan
Ahvaz_Feb
Ahvaz_Mar
...
Ahvaz_Dec
then next station_name:
Abadan_Jan
Abadan_Feb
Abadan_Mar
...
Abadan_Dec
Then the next station and so on ... the year doesn't matter, I only care about name of stations and month.
I don't know how to start doing that. Can anyone help me? I attached my file.
  2 个评论
Mohammad Sami
Mohammad Sami 2020-1-26
Can I ask why do you want to create separate variables for each station / month combination ? If you want to further process the data later, it will just make it more complicated.
BN
BN 2020-1-26
In fact in the water resources engineering when we want to use climate stations data always we have some missing values in each station that should estimate and fill using linear regression from the nearest station. Please consider station A and station B which they are near together and we have their monthly precipitation data from 1989 to 2018 that containing missing values. To fill missing values in the month, we should use linear regression for each month between A and B and use the equation (for example A = 2B-2.3) to fill missing values in station A (12 regressions for each station). Now I have 71 stations that with your kindly help in the previous question I found the nearest stations. Now I want to conduct linear regression between them and then fill missing values.

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2020-1-26
编辑:Image Analyst 2020-1-26
Try ismember() or contains().

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by