how can i move cell components to new line

조회 수: 2 (최근 30일)
Sajid Afaque
Sajid Afaque 2020년 6월 2일
답변: madhan ravi 2020년 6월 2일
hello All,
i have a cell array where each row looks like
a{5} = 'temp=25' 'vds=12' 'id=60' 'vbchmax=14'
now i want to make all this component one below other like
a{5} = 'temp=25'
'vds=12'
'id=60'
'vbchmax=14'
i tried using sprintf but no success, as sprintf is not applicable for cells i guess
sprintf('%s\n %s\n %s\n %s\n 'a{5})
please guide me,
Thanks in Advance

채택된 답변

madhan ravi
madhan ravi 2020년 6월 2일
a = cellfun(@transpose, a, 'un', 0)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기

태그

제품


릴리스

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by