dog

Splits n-dimensional array into 1-d cell array which stores squeezed slices of M along dimension 'dim'. Opposite of the 'cat' command.
24 Downloads
Updated 19 Jul 2018

View License

"Dog" is meant to do reverse of the 'cat' command: splits n-dimensional array into 1-d cell array which stores squeezed slices of M along dimension 'dim'. For example:
a1=rand(3,4)
a2=rand(3,4)
a3=rand(3,4)
aa={ a1,a2,a3 }
c1=cat(3, a1,a2,a3)
c2=cat(3, aa{:}) % gives same result
d_3=dog(c1, 3)
d_2=dog(c1, 2)
Note: joining the slices in 'd_i' back using 'cat' may need to be followed by permuting dimensions (function permute).

Cite As

Lukas Chvatal (2024). dog (https://www.mathworks.com/matlabcentral/fileexchange/68253-dog), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Structures in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

Version Published Release Notes
1.0.0