Matrix indexing- How to assign variable c to second row of A
3 views (last 30 days)
Show older comments
A=[1:5; 6:10; 11:15; 16:20];
0 Comments
Accepted Answer
Stephen23
on 13 Aug 2020
A(2,:) = c
As explained here: https://www.mathworks.com/help/matlab/getting-started-with-matlab.html
3 Comments
More Answers (0)
See Also
Categories
Find more on Resizing and Reshaping 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!