matrix value propagation along the rows
Show older comments
Hello,
A(1,1:7) vector and I want a mtrix where A is repeated in B matrix 19 rows B(1:19,1:7).
Matlab sims to have issues with B(1:19,:)=A, or B(1:19,1:7)=A.
So idea is A = [1 2 3 4 5 6 7]
and resulting
B = [
1 2 3 4 5 6 7
1 2 3 4 5 6 7
1 2 3 4 5 6 7
...
] (in 19 rows)
BR
Sanat
Accepted Answer
More Answers (1)
A = [1 2 3 4 5 6 7];
B = repmat(A,[19,1])
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!