How to save to .txt using WRITEMATRIX ?

1 view (last 30 days)
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 ?

Accepted Answer

Mathieu NOE
Mathieu NOE on 17 Mar 2021
writematrix(num2str(M,'% .14e'),'M.txt','Delimiter','tab');

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!