Create Array Within Array

13 Ansichten (letzte 30 Tage)
Matthew
Matthew am 3 Okt. 2017
Beantwortet: Walter Roberson am 3 Okt. 2017
I need to create an array. Within that array, each cell of the array is a numerical array unto itself (i.e., child arrays within a parent array). I did it accidentally a few weeks ago, but cannot remember how. Would somebody be able to give me some guidance?
Thanks in advance,
M Ridzon

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 3 Okt. 2017
A = cell(1,5);
for K = 1 : 5
A{K} = randi(6, 1, 10);
end

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by