How to save to .txt using WRITEMATRIX ?

2 次查看(过去 30 天)
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
writematrix(num2str(M,'% .14e'),'M.txt','Delimiter','tab');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Export 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by