The correct way of importing data from a specific format

2 次查看(过去 30 天)
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 个评论
Negar
Negar 2014-12-19
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!

请先登录,再进行评论。

采纳的回答

Orion
Orion 2014-12-19
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{:}

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Large Files and Big Data 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by