The correct way of importing data from a specific format

3 visualizaciones (últimos 30 días)
Negar
Negar el 19 de Dic. de 2014
Respondida: Orion el 19 de Dic. de 2014
Hello all,
In my project I have a set of files with a specific format (.acs). I saved the files as .txt format, (because I couldn't find a better way) and then imported them by importdata function. But I can see that the imported data is different from the original .acs files. (I'm almost sure that its because I copied the files from .acs to .txt, and its why it's not working properly.)
So, what is the correct way to import data from a specific format like the one in my project?
  1 comentario
Negar
Negar el 19 de Dic. de 2014
I tried to use load, but the files include a special character at the header (#) that makes the load impossible to work (the columns are not of equal length, because of that character). So, is there any way to get read of that character? I tried the load after removing that character manually and it works, but its not easy to remove for 1340 files! Any suggestion appreciated!

Iniciar sesión para comentar.

Respuesta aceptada

Orion
Orion el 19 de Dic. de 2014
I don't know this .acs extension, but if it just contains some text, you can use textscan :
fid = fopen('YourFilePath.acs');
AcsContent = textscan(fid,'%s','delimiter','\n');
fclose(fid);
% see the content in the command window
AcsContent{:}

Más respuestas (0)

Categorías

Más información sobre Large Files and Big Data 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