Dear Users I have the energy.txt file and i need ti extract two columns data from this file [No ,Levels]

4 ビュー (過去 30 日間)
Dear Users I have the energy.txt file and i need ti extract two columns data from this file [No ,Levels]
The following file as follow:
nblock = 1 ncftot = 79 nw = 9 nelec = 3 nblock = 2 ncftot = 186 nw = 9 nelec = 3
Energy levels for ...
Rydberg constant is 109737.31534
No - Serial number of the state; Pos - Position of the state within the
J/P block; Splitting is the energy difference with the lower neighbor
-------------------------------------------------------------------------
No Pos J Parity Energy Levels Splitting
1 1 1/2 + -34.7830481 0.00000 0.00000
2 1 1/2 - -34.4869723 64981.12 64981.12
3 1 3/2 - -34.4863648 65114.46 133.33
Then i need to plot the No versus levels columns.Any one could help me as soon please. RGD/mahmoud

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 12 月 19 日
Select Import Data on the home tab, select the file, select the columns you want and hit import.
  2 件のコメント
mahmoud el majzoub
mahmoud el majzoub 2014 年 12 月 19 日
Hello sean I did this step but i need à flexible script to import the first column and sixth (levels) by ignoring the strings and characters then to plot levels versus No. [no,levels]=textread('energy.txt',... '%s %*s %*s%*s%*s%s%*s,'headerlines',9) Gave string vector for No and levels
Sean de Wolski
Sean de Wolski 2014 年 12 月 19 日
編集済み: Sean de Wolski 2014 年 12 月 19 日
Generate a function from the import tool!
(Arrow under the import button)

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by