how to separate two conjoined number obtained during ripping a piece of data from a large file?

1 回表示 (過去 30 日間)
hi,
while ripping some data out of a lrge file and writing onto a txt file, I ibtained a number in the 5th row which is combination two numbers. It is as it is in the original file itself. How can I separate this number into two. because I need further calculation on this text file by taking it into an excel sheet. but importing the data into excel jumbles all the data out of order.
  2 件のコメント
Divyajyoti Nayak
Divyajyoti Nayak 2024 年 10 月 19 日
Hi @Saurav Parmar, the file "series_3_zn_porph2_complex_mesityl_par_wB97XD_200xs.log" isn't provided. Without it, it would be difficult to see the issue.
Saurav Parmar
Saurav Parmar 2024 年 10 月 20 日
Hi Divyajyoti,
I have attached the original file from which data has been ripped. Since the data is related to my research so I have truncated certain parts of it...but the pertinent part related to my question is there in the file. Please have a look and let me know.

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

採用された回答

Stephen23
Stephen23 2024 年 10 月 20 日
編集済み: Stephen23 2024 年 10 月 20 日
Import the file as fixed-width:
F = 'series_3_zn_porph2_complex_mesityl_par_wB97XD_200xs_rip.txt';
T = readtable(F, "FileType","fixedwidth", "VariableWidths",[28,10,10,10,10,10], "ReadVariableNames",0)
T = 398x6 table
Var1 Var2 Var3 Var4 Var5 Var6 ______________________________ _______ _______ _______ _______ _______ {'Alpha occ. eigenvalues --'} -347.47 -347.47 -42.34 -42.339 -37.315 {'Alpha occ. eigenvalues --'} -37.315 -37.31 -37.31 -37.309 -37.309 {'Alpha occ. eigenvalues --'} -14.447 -14.447 -14.447 -14.447 -14.446 {'Alpha occ. eigenvalues --'} -14.445 -14.445 -14.445 -10.342 -10.342 {'Alpha occ. eigenvalues --'} -10.342 -10.342 -10.34 -10.34 -10.34 {'Alpha occ. eigenvalues --'} -10.34 -10.34 -10.34 -10.34 -10.34 {'Alpha occ. eigenvalues --'} -10.34 -10.34 -10.339 -10.339 -10.339 {'Alpha occ. eigenvalues --'} -10.339 -10.339 -10.339 -10.335 -10.334 {'Alpha occ. eigenvalues --'} -10.334 -10.33 -10.33 -10.33 -10.33 {'Alpha occ. eigenvalues --'} -10.328 -10.328 -10.326 -10.326 -10.326 {'Alpha occ. eigenvalues --'} -10.325 -10.325 -10.325 -10.325 -10.325 {'Alpha occ. eigenvalues --'} -10.325 -10.317 -10.317 -10.317 -10.317 {'Alpha occ. eigenvalues --'} -10.317 -10.317 -10.316 -10.316 -10.315 {'Alpha occ. eigenvalues --'} -10.315 -10.314 -10.314 -10.314 -10.313 {'Alpha occ. eigenvalues --'} -10.313 -10.313 -10.313 -10.313 -10.313 {'Alpha occ. eigenvalues --'} -10.313 -10.313 -10.313 -10.313 -10.313

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by