I need output this statement
1 view (last 30 days)
Show older comments
a=[1:10 75:-1:50] I need explaination and output.
0 Comments
Accepted Answer
KSSV
on 16 Jul 2022
a1=1:10 % generate numbers between 1 and 10 with increment of 1
a2 = 75:-1:50 ; % generate numbers between 75 and 50 with difference of 1. As 75 > 50, to generate numbers
% you need to give -1
a=[a1 a2] % join a1 and a2 into a single array. As both a1 and a2 are row vectors, you can do this
2 Comments
More Answers (0)
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!