how to save digital output

4 ビュー (過去 30 日間)
Yuanju Chao
Yuanju Chao 2019 年 11 月 27 日
回答済み: Walter Roberson 2019 年 11 月 28 日
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?

回答 (2 件)

Walter Roberson
Walter Roberson 2019 年 11 月 28 日
dlmwrite('a_out.txt', a, 'delimiter', ' ');

Akira Agata
Akira Agata 2019 年 11 月 28 日
How about using writematrix function?
writematrix(a,'a_out.txt','Delimiter',' ');
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 11 月 28 日
Note that writematrix() needs R2019b or later.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by