read a csv file with text

4 views (last 30 days)
Ricardo Cachu
Ricardo Cachu on 26 Sep 2019
Commented: Stephen23 on 26 Sep 2019
Hello
I have my data in csv file like this:
111111,0,CANCUN REGION 96,QUINTANA ROO,PENINSULAR,12,1D,BIMESTRAL PAR,2018,12,108,91.02
111112,0,CANCUN REGION 96,QUINTANA ROO,PENINSULAR,12,1D,BIMESTRAL PAR,2018,2,141,122.57
111113,0,CANCUN REGION 96,QUINTANA ROO,PENINSULAR,12,1D,BIMESTRAL PAR,2018,5,67,46.69
... (6million more data)
The file is 500MB, it's so much that MATLAB can't import with it because my computer begins to freeze.
So this is what I need to do:
  1. Where it say "CANCUN REGION" it the name of a city, in the file there are so many names and I only need to work with CANCUN REGION
  2. Then, when I have only the data of the city I want, I need to do an excel, there will be the first number and four, two and one before the last one and save the excel as "REGION CANCUN" . Exemple: 111111, BIMESTRAL PAR, 12,108
Please tell me some method that I can work or funtions maybe can be usefull :)

Answers (0)

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!