how to save digital output

4 visualizaciones (últimos 30 días)
Yuanju Chao
Yuanju Chao el 27 de Nov. de 2019
Respondida: Walter Roberson el 28 de Nov. de 2019
a=[ 1 0 1 0 1 1 0 0 1 1 0];
save a_out.txt -ascii a
1.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00 1.0000000e+00 1.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 1.0000000e+00 0.0000000e+00
is there a way to save it as
1 0 1 0 1 1 0 0 1 1 0? as digital output so I can feed it into simualtor?

Respuestas (2)

Walter Roberson
Walter Roberson el 28 de Nov. de 2019
dlmwrite('a_out.txt', a, 'delimiter', ' ');

Akira Agata
Akira Agata el 28 de Nov. de 2019
How about using writematrix function?
writematrix(a,'a_out.txt','Delimiter',' ');
  1 comentario
Walter Roberson
Walter Roberson el 28 de Nov. de 2019
Note that writematrix() needs R2019b or later.

Iniciar sesión para comentar.

Categorías

Más información sobre Standard File Formats en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by