How to find inverse of concatenate

6 views (last 30 days)
Suppose i have a matrix
r=[1 2 3]
g=[4 5 6]
b=[7 8 9]
rgb=cat(3,r,g,b)
Now how could I recover r,g,b matrix from rgb matrix

Accepted Answer

Guillaume
Guillaume on 12 Mar 2015
r = rgb(:, :, 1);
g = rgb(:, :, 2);
b = rgb(:, :, 3);
  1 Comment
Roman Voronov
Roman Voronov on 9 Feb 2019
how about programmatically, without doing each line manually?

Sign in to comment.

More Answers (0)

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!