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

 Respuesta aceptada

Star Strider
Star Strider el 3 de Jun. de 2022
Use fprintf
str = {'cats', 'dogs', 'birds'};
fprintf('%s\n',str{:})
cats dogs birds
.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de Jun. de 2022

Respondida:

el 3 de Jun. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by