problem to load txt file with multibled data and textdata

1 回表示 (過去 30 日間)
Touts Touts
Touts Touts 2019 年 4 月 12 日
回答済み: Walter Roberson 2019 年 4 月 13 日
Please who i can load the folowing txt file
7 header lines to skipe
get the string (2 to 4 colomun) matrix and numerical matrix (1, 5 to 11 colomun)
22:52:48
Table: Out
AAAAA BBBBBBBBBB CCCCCCCC DDDDDDDDD EEEEEEE DD FF GG HH II RR
! ! ! ! ! !
9 KLM OooOooOoo Para 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
9 KLM OooOooOoo Para 0.010000 -2.710E-07 0.000000 0.000000 0.000000 0.000000 0.000000
9 KLM OooOooOoo Para 0.020000 -1.517E-06 0.000000 0.000000 0.000000 0.000000 0.000000
9 KLM OooOooOoo Para 0.030000 -4.848E-06 0.000000 0.000000 0.000000 0.000000 0.000000
  3 件のコメント
Touts Touts
Touts Touts 2019 年 4 月 13 日
Plase the file (Mytxt.txt) is attached
Thanks
Touts Touts
Touts Touts 2019 年 4 月 13 日
Problem solved, another posed.
Thanks to all

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2019 年 4 月 13 日
filename = 'Mytxt.txt';
opt = detectImportOptions(filename);
t = readtable(filename, opt);
col2 = t{:,2}; %cell array of character vectors such as KLM
col3 = t{:,3}; %cell array of character vectors such as ooooOooo
col4 = t{:,4}; %cell array of character vectors such as Para
numbers = t{:,[1 5:11]}; %numeric array

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by