Creation of matrix (72,1) by defined elements
Show older comments
Hello. I have three matrices (24,1): Pstmax(24,1), Pproda(24,1), Pprodb(24,1), and i want to create a matrix ub(72,1) that contains the elements of the three defined matrices as follow:

Best regards.
Accepted Answer
More Answers (1)
Star Strider
on 16 Jan 2016
This works:
Pstmax = randi(99, 24, 1);
Preproda = randi(99, 24, 1);
Preprodb = randi(99, 24, 1);
Prevct = reshape(reshape([Pstmax; Preproda; Preprodb], [], 3)', [], 1);
1 Comment
ET-TAOUSSI mehdi
on 16 Jan 2016
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!