Deleting a a part of a dimension in a 4D array
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a 4D array of MR images that are 64 x 64 x 128 x 16. side=64 # of images=128 # of slices in one image=16
I want to delete the last 6 of the slices
So basically, I want my array to look like 64 x 64 x 128 x 10
Can someone please help me. Thanks!
0 个评论
采纳的回答
the cyclist
2012-2-8
If X is your array, then
X(:,:,:,11:end) = [];
removes the 11th-16th slices in the 4th dimension.
4 个评论
Madeleine Dacey
2019-5-22
How would you remove just one of the volumes? i.e. say you want to remove only the 11th image.
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!