필터 지우기
필터 지우기

How to combine array or matrix???

조회 수: 4 (최근 30일)
reez all
reez all 2012년 3월 12일
i have problem on combine a few matrix into one. For example matrix with (1,3),(1,4),(1,1) and (1,2) into (1,n). The number of matrix is generated randomly and the size of matrix also is randomly. If i used zeros matrix and save all the matrix into it, how am i suppose to know the total size of zeros matrix that i have to create? is there any other way to solve this proble?? thank you..

채택된 답변

Jan
Jan 2012년 3월 12일
How do you store the set of matrices? If they are stored in a cell:
C = {rand(1, 3), rand(1,4), rand(1,1), rand(1,2)};
D = cat(2, C{:});
  댓글 수: 1
reez all
reez all 2012년 3월 13일
thank you, it's work..

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by