Filter löschen
Filter löschen

The correct way of importing data from a specific format

2 Ansichten (letzte 30 Tage)
Negar
Negar am 19 Dez. 2014
Beantwortet: Orion am 19 Dez. 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 Kommentar
Negar
Negar am 19 Dez. 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!

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Orion
Orion am 19 Dez. 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{:}

Weitere Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by