How to Create a 5x5 matrix whose rows are (1:5)?
15 views (last 30 days)
Show older comments
Create a 5x5 matrix whose rows are (1:5).
0 Comments
Accepted Answer
Star Strider
on 6 Sep 2017
You can do that with simple vector multiplication:
A = ones(5, 1) * (1:5);
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices 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!