View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
TransposeMat - like transpose, but handles N-D arrays

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 1.3 KB File ID: #41776 Version: 1.1

TransposeMat - like transpose, but handles N-D arrays



16 May 2013 (Updated )

Transposes the rows/columns (only) on any N-dimensional array

| Watch this File

File Information

Matlab provides 'transpose' for 2-D arrays and 'permute' for N-D arrays. This is just a very basic interface that chooses the correct one to use for the situation, but ONLY ever transposes rows/columns.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
17 May 2013 Jan Simon

Jan Simon (view profile)

This would be a more compact one-liner:

out = permute(in, [2, 1, 3:ndims(in)]);

Comment only
16 May 2013 1.1

Fixed bugs for non-square matricies

Contact us