I have a problem I am trying to solve that creates an Nx1 cell where the data stored inside it are always N number of 2x2 matrices.
Example:
N = 2
mycell = cell(N,1);
for i =1:N;
mycell{i} = randi([0, 10], 2);
end
newmatrix = zeros (N+1);
So say mycell{1} looks like:
[3 5
2 1]
and mycell{2} looks like:
[6 9;
3 2]
My new matrix of zeros looks like:
[0 0 0
0 0 0
0 0 0]
I want to get it too look like this (joining the last element of the first cell with the first element of the next cell in this sort of diagonal setup):
[3 5 0
2 7 9
0 3 2]
Is there a simple way to do this or any built in Matlab functions that may help?
Thank you.