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 ?

 Respuesta aceptada

Mathieu NOE
Mathieu NOE el 17 de Mzo. de 2021
writematrix(num2str(M,'% .14e'),'M.txt','Delimiter','tab');

2 comentarios

도현 김
도현 김 el 18 de Mzo. de 2021
thank you ! ! ! !
Mathieu NOE
Mathieu NOE el 18 de Mzo. de 2021
you're welcome

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2020b

Preguntada:

el 17 de Mzo. de 2021

Comentada:

el 18 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by