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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by