Display string line by line

1 回表示 (過去 30 日間)
Elysi Cochin
Elysi Cochin 2022 年 6 月 3 日
回答済み: Star Strider 2022 年 6 月 3 日
str = {'cats', 'dogs', 'birds'};
how to display the above string in command window as
cats
dogs
birds

採用された回答

Star Strider
Star Strider 2022 年 6 月 3 日
Use fprintf
str = {'cats', 'dogs', 'birds'};
fprintf('%s\n',str{:})
cats dogs birds
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by