dog
"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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |