How can I create a 3D array?

1 Ansicht (letzte 30 Tage)
Matthew Worker
Matthew Worker am 28 Dez. 2020
Bearbeitet: JC am 30 Dez. 2020
for i=1:n-1
Image2 = uigetfile('*p*');
ImageArray2 =imread(Image2);
MDArray = cat(3,ImageArray,[ImageArray2]);
end
I need to add more images onto the third dimension but I am unsure how to do this. Can anyone help with any tips/suggestions?

Akzeptierte Antwort

Steve Eddins
Steve Eddins am 28 Dez. 2020
Try something like this:
for i = 1:n-1
next_image = uigetfile('*p*');
ImageArray = cat(3,ImageArray,next_image);
end
When this loop finishes, the variable ImageArray is your multidimensional array.

Weitere Antworten (0)

Kategorien

Mehr zu Subsystems finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by