Insert 3D array into Another 3D Array
Show older comments
Hi. I am trying to insert the contents of one 3D array into another. Both represent logical/binary volumes. So far I have,
Y = yMax-yMin;
X = xMax-xMin;
Z = zMax-zMin;
smallArray = ones(Y,X,Z);
bigArray = zeros(500,400,60);
bigArray(yMin:yMax,xMin:xMax,zMin:zMax) = smallArray;
The values of yMin, yMax, xMin, xMax, zMin, zMax, X, Y and Z are within the range of bigArray. For example, yMin = 10, yMax = 120, etc.
But I receive an error about "Subscripted assignment dimension mismatch".
Any guidance would be great, thanks!
Accepted Answer
More Answers (1)
Jason Bond
on 7 Jun 2017
0 votes
Categories
Find more on Color Segmentation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!