How to save to .txt using WRITEMATRIX ?

M=ones(1,5)
writematrix(M,'M.txt','Delimiter','tab');
>> 1 1 1 1 1
but i want to : 1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000 1.00000000000000e+000
how can i get it ?

 採用された回答

Mathieu NOE
Mathieu NOE 2021 年 3 月 17 日

0 投票

writematrix(num2str(M,'% .14e'),'M.txt','Delimiter','tab');

2 件のコメント

도현 김
도현 김 2021 年 3 月 18 日
thank you ! ! ! !
Mathieu NOE
Mathieu NOE 2021 年 3 月 18 日
you're welcome

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by