필터 지우기
필터 지우기

Is there any way to create array of arrays or matrix of matrices?

조회 수: 164 (최근 30일)
Isee You
Isee You 2013년 5월 15일
i want to create array of arrays or matrix of matrices?
or
create arrays automatically in{ for - loop} then combine them in one array .

채택된 답변

Jan
Jan 2013년 5월 16일
Arrays can contain all types of Matlab variables as elements, but no arrays.
A "matrix of matrices" can be seen as 4D array:
a = zeros(2, 2, 3, 4);
a(:, :, 1, 1) = rand(2, 2);
etc.
Or with a loop:
for i1 = 1:3
for i2 = 1:4
a(:, :, i1, i2) = rand(2, 2);
end
end
  댓글 수: 6
Jan
Jan 2013년 5월 17일
@aboomnea: Is the original problem solved?
Isee You
Isee You 2013년 5월 17일
thanks very much @jan-simon:
it solve my problem

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by