create non uniform increment vector
3 次查看(过去 30 天)
显示 更早的评论
hi
how can I in a single command creat this vector:
a=12345678910987654321
thanks
0 个评论
回答(2 个)
Robin Kirsch
2020-6-12
编辑:Robin Kirsch
2020-6-12
a = [1:10 9:-1:1]
a =
Columns 1 through 13
1 2 3 4 5 6 7 8 9 10 9 8 7
Columns 14 through 19
6 5 4 3 2 1
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!