Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
a = ones(2,2,2)
a(:,:,1) =
1 1 1 1
a(:,:,2) =
I want to append ones(1,1) to the bottom row of each of a(:,:,1) and a(:,:,2)
It's easy to do with CAT function:
a = cat(1, a, ones(1,2,2));
or VERTCAT:
a = vertcat(a, ones(1,2,2));