Inserting multiple columns into an existing matrix in equal distance
1 view (last 30 days)
Show older comments
I would like to break down the red matrix (see below) into 3 columns and insert each column in equal distance into the yellow one.

0 Comments
Accepted Answer
James Tursa
on 11 Dec 2017
E.g.,
yellowx = reshape(yellow,[],size(red,2));
result = reshape([red;yellowx],size(red,1),[]);
More Answers (0)
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!