how to save a matrix in a loop together whose size is changing?

1 次查看(过去 30 天)
I have a matrix A who is changing the number of columns and rows in a loop for example,
there are 5 iterations
for i=1:5
........
........
........
end
where
A(1)=[2 3 4];
A(2)=[1 2 3 4 5
1 5 2 6 8];
A(3)=[2 1 4 5 6 7];
A(4)=[1 2 5 6 7 8
2 3 9 4 3 1];
A(5)=[1 2 3 4 5 6 7 8];
in B i want to save all the values of A.
please help me.

采纳的回答

Stephen23
Stephen23 2015-8-10
编辑:Stephen23 2015-8-10
You could put the matrices into a cell array:
B = cell(1,5);
for k = 1:5
B{k} = A;
end
You might like to read this in addition to the link that I gave above:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by