필터 지우기
필터 지우기

creating a three-dimensional array from three array with different size

조회 수: 1 (최근 30일)
sermet OGUTCU
sermet OGUTCU 2022년 5월 12일
편집: KSSV 2022년 5월 12일
a= 1 x 8 %double
b= 1 x 7 %double
c= 1 x 6 %double
How I can merge a,b,c into a single three-dimensional array with three pages and one column such as:
first page (1,1,1) = a
second page (1,1,2) = b
third page (1,1,3) = c

채택된 답변

KSSV
KSSV 2022년 5월 12일
편집: KSSV 2022년 5월 12일
a = rand(1,8) ;
b = rand(1,7) ;
c = rand(1,6) ;
iwant = cell(3,1) ;
iwant{1} = a ;
iwant{2} = b ;
iwant{3} = c ;
iwant
iwant = 3×1 cell array
{[0.5613 0.0662 0.0848 0.5277 0.0531 0.5905 0.7043 0.5779]} {[ 0.5251 0.3192 0.9939 0.9976 0.5268 0.1235 0.5563]} {[ 0.0591 0.6501 0.5743 0.9299 0.5936 0.9937]}

추가 답변 (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