Reputation: 891
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)
Upvotes: 1
Views: 28
Reputation: 19870
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));
Upvotes: 2