How to write an output text file in a tabular form in matlab??

1 回表示 (過去 30 日間)
Virajan Verma
Virajan Verma 2018 年 10 月 1 日
回答済み: ANKUR KUMAR 2018 年 10 月 1 日
X=0.22, 0.3456,0.5567 Y=0.1123,1.9823,1.2345 Z=0.34,0.332,0.897

回答 (2 件)

ANKUR KUMAR
ANKUR KUMAR 2018 年 10 月 1 日
X= [0.22, 0.3456,0.5567]' ;
Y= [0.1123,1.9823,1.2345]' ;
Z= [0.34,0.332,0.897]' ;
AA=[X Y Z]
B=arrayfun(@(x) num2str(x) , AA,'uni',0)
BB=[{'array1','array2','array3'};B]
dlmcell('test.txt',BB)

KSSV
KSSV 2018 年 10 月 1 日
X= [0.22, 0.3456,0.5567]' ;
Y= [0.1123,1.9823,1.2345]' ;
Z= [0.34,0.332,0.897]' ;
T = table(X,Y,Z)
  2 件のコメント
Virajan Verma
Virajan Verma 2018 年 10 月 1 日
text file?? Not in command window
KSSV
KSSV 2018 年 10 月 1 日
Write that using writetable

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by