Creation of matrix (72,1) by defined elements
3 views (last 30 days)
Show older comments
ET-TAOUSSI mehdi
on 16 Jan 2016
Commented: ET-TAOUSSI mehdi
on 16 Jan 2016
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.
0 Comments
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);
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!