File Exchange

image thumbnail

TransposeMat - like transpose, but handles N-D arrays

version 1.1 (1.3 KB) by

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

0 Downloads

Updated

View License

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.

Comments and Ratings (1)

Jan Simon

Jan Simon (view profile)

This would be a more compact one-liner:

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

Updates

1.1

Fixed bugs for non-square matricies

MATLAB Release
MATLAB 7.10 (R2010a)

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

» Watch video