フィルターのクリア

How to split cell array values into two text file?

3 ビュー (過去 30 日間)
Star Rats
Star Rats 2019 年 8 月 25 日
コメント済み: Star Rats 2019 年 8 月 25 日
I have a text file contains cell array values as shown below:
0.12912,0.073733
0.13065,0.070284
0.13862,0.073794
0.15296,0.077944
0.1655,0.08768
0.17768,0.096988
0.18497,0.10117
0.19132,0.1041
.
.
.
0.1102,0.011078
How do I separate the values into two text file (first values in one text file and 2nd value in second text file)?
Thanks

採用された回答

madhan ravi
madhan ravi 2019 年 8 月 25 日
v=dlmread('sample.txt') % your file name , use readmatrix() if you’re using 2019a or later
dlmwrite('txt1.txt',v(:,1))
dlmwrite('txt2.txt',v(:,2)) % use writematrix() if 2019a or later
  1 件のコメント
Star Rats
Star Rats 2019 年 8 月 25 日
It works. Thanks @madhan for the reply. Appreciate.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by