create a cell array with incrementing values
조회 수: 14 (최근 30일)
이전 댓글 표시
how to create a cell with values like
a1 a2 a3 a4 a5 ........ a25
i need to get the above values into a row cell array and column cell array
do i need for loop or is there a simple way
댓글 수: 0
채택된 답변
madhan ravi
2019년 4월 3일
regexp(cellstr(sprintf('a%d ',1:25)),' ','split')
댓글 수: 1
madhan ravi
2019년 4월 3일
편집: madhan ravi
2019년 4월 3일
Another option:
sprintfc('a%d',1:25) % beware, undocumented!
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!