str = {'cats', 'dogs', 'birds'};
how to display the above string in command window as
cats
dogs
birds

 Akzeptierte Antwort

Star Strider
Star Strider am 3 Jun. 2022

1 Stimme

Use fprintf
str = {'cats', 'dogs', 'birds'};
fprintf('%s\n',str{:})
cats dogs birds
.

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings 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!

Translated by