create a cell array with incrementing values
12 次查看(过去 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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!