how to make an array with only single numbers from 1 till n
31 次查看(过去 30 天)
显示 更早的评论
hey,
i was wondering how i can make a single array (a) from 1 till n where are only single numbers in it. so if you have an array with 19 numbers it should look like a= [1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 ] i hope someone can help me out.
0 个评论
采纳的回答
Massimo Zanetti
2016-10-8
编辑:Massimo Zanetti
2016-10-8
Here it is
m=1:14
s=regexprep(num2str(m),' ','')-48
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!