フィルターのクリア

skip the headers in a text file and extract the data ?

96 ビュー (過去 30 日間)
Ano
Ano 2016 年 11 月 25 日
コメント済み: unme 2017 年 2 月 9 日
I would like to extract the data only from a text file. the text file has a header which contains some numerical values as shown below?
Matrix detected
Double precision storage used.
Matrix size is 5 x 5
Matrix elements a(m,n)
m: matrix row
n: matrix column
m n value
1 1 -4.741986825761376E+00
2 1 -4.630424392475458E+00
3 1 -4.307409743346405E+00
4 1 -3.804889997051831E+00
5 1 -3.171836516325863E+00
1 2 -4.630424380271435E+00
2 2 -4.741959894978010E+00
3 2 -4.630411248725576E+00
4 2 -4.307409755549543E+00
5 2 -3.804868350860215E+00
1 3 -4.307409755549557E+00
2 3 -4.630411248725565E+00
3 3 -4.741959894978017E+00
4 3 -4.630424380271435E+00
5 3 -4.307397514355404E+00
1 4 -3.804889997051820E+00
2 4 -4.307409743346408E+00
3 4 -4.630424392476307E+00
4 4 -4.741986825762240E+00
5 4 -4.630424392476300E+00
1 5 -3.171836516321907E+00
2 5 -3.804868350853141E+00
3 5 -4.307397514355404E+00
4 5 -4.630424380271435E+00
5 5 -4.741959894978017E+00

採用された回答

KSSV
KSSV 2016 年 11 月 25 日
編集済み: KSSV 2016 年 11 月 25 日
doc textscan
fid = fopen('your text file') ;
data = textscan(fid,'%f %f %f','HeaderLines',7) ;
data = cell2mat(data)
fclose(fid);
  3 件のコメント
KSSV
KSSV 2016 年 11 月 25 日
Yes you are right...
unme
unme 2017 年 2 月 9 日
Probably its a impedance matrix from the Feko??

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by