Only keep rows with the same names from multiple excel files
显示 更早的评论
I have multiple excel files with data for different roads across several years. I would like to create a file that combines all the data for the different roads across the years but only for the roads that appear in all years. I have attached two files as an example of the data I am working with. The important column is the "ROAD_NAME" column. For example, lets say Smith Road appears in the 2013 file, but not the 2014 file, I want to delete the rows that contain Smith Road. Lets also say that John Street appears in both the 2013 and 2014 files, so I want to keep all the rows that contain John Street.
I'm pretty new to matlab so any advice would be appreciated
回答(1 个)
KSSV
2019-7-5
0 个投票
- Load the files using either xlsread or readtable.
- YOu can get the common data from both the files using either ismember or intersect.
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!