Display string line by line

조회 수: 4 (최근 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 CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by