Importing multiple files with multiple columns.

1 visualización (últimos 30 días)
Russ
Russ el 15 de Ag. de 2012
Hello,
I have 100 data files that I'd like to import that are in ascii format each with 8 columns and 10000 lines of data. At the top of each file are two lines of information that I want to ignore as it is information automatically generated by my software.
I have successfully imported files by themselves using the load function and I have since tried to import multiple files following the advice on this page http://www.mathworks.co.uk/support/solutions/en/data/1-190XP/?solution=1-190XP, but I have been unsuccessful.
I tried to include the importdata option instead to elminate the first two lines, but again I can't seem to get this to work.
Also, the matlab website recommends avoiding using the eval function, but I do not know how to get around this.
The data is going to be used to plot many graphs.
Any advice would be great!
Thanks for your time,
Russ
  1 comentario
Oleg Komarov
Oleg Komarov el 15 de Ag. de 2012
OMG TMW should really erase it with fire that page!!!

Iniciar sesión para comentar.

Respuestas (1)

Oleg Komarov
Oleg Komarov el 15 de Ag. de 2012
Editada: Oleg Komarov el 15 de Ag. de 2012
Then, your description is really vague. To be more specific you need to tell us which type of data you have in your columns. Are the files of the same size and same type?
I can only suggest to use textscan() to import data.
Also, "but again I can't seem to get this to work." says nothing. Did you get an error? Did you get unexpected result?
Consider that you might have corrupt files, or files which for some reason changed their format, thus the sequential import fails at some point (when? did you check at which point in the loop?)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by