Only keep rows with the same names from multiple excel files
Mostrar comentarios más antiguos
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
Respuestas (1)
KSSV
el 5 de Jul. de 2019
0 votos
- Load the files using either xlsread or readtable.
- YOu can get the common data from both the files using either ismember or intersect.
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!