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

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

 Réponse acceptée

KSSV
KSSV le 12 Mai 2022
Modifié(e) : KSSV le 12 Mai 2022
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]}

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by