matrix arithmetic numbers short way
2 views (last 30 days)
Show older comments
Commented: Grkn12 on 1 Jan 2021
is there any short way to define a matrix that contains arithmetic number , for instance A = [ 1 2 3 4 5 6 ..... 30 ] can I write this matrix in a different and short form instead of writing all these numbers ?
Ameer Hamza on 1 Jan 2021
Yes, quite easily.
A = 1:30;
Read about colon operator: https://www.mathworks.com/help/matlab/ref/colon.html
Find more on Genomics and Next Generation Sequencing 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!