How to save to .txt using WRITEMATRIX ?

3 views (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)

Categories

Find more on Historical Contests in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!