コマンドウインドウに配列を要素ごとに表示させる。
Ältere Kommentare anzeigen
Z = ([1, 2.254, 8]);
fprintf('%g', Z)
でコマンドウインドウの出力結果が
12.2548
となりますが、これを
1 2.254 8
となるようにするにはどのようにするべきでしょうか?
Akzeptierte Antwort
Weitere Antworten (1)
Atsushi Ueno
am 21 Sep. 2021
Bearbeitet: Atsushi Ueno
am 21 Sep. 2021
Z = ([1, 2.254, 8]);
Z % これでも「コマンドウインドウに配列を要素ごとに表示」出来るっちゃ出来る
format shortG; % 末尾のゼロを削除する為
Z
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!