フィルターのクリア

The correct way of importing data from a specific format

2 ビュー (過去 30 日間)
Negar
Negar 2014 年 12 月 19 日
回答済み: Orion 2014 年 12 月 19 日
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 Center および File ExchangeLarge 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