简体   繁体   中英

Merge multiple 3D arrays matlab

I have a 3 sets of CT data each in it's own 700x700x512 array and I want to merge them into just one single array.

I had a look at the cat() function but didn't really understand how you set the dim variable- ie say for two simple 3x3x3 arrays, A & B, can I use AB_merge = cat(dim, A, B);

Thanks for any help!

The dim variable sets along which dimension you want to concatenate the images.

So if you want them 'on top of each other' that is along the 3rd dimensions:

AB_merge=cat(3, A, B);

If it is side by side along the x-axis:

AB_merge=cat(1, A, B);

etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM