Alternative Dimensions - MATLAB Cody - MATLAB Central

Problem 43737. Alternative Dimensions

Difficulty:Rate

Given a multidimensional matrix, transform the matrix so the dimensions are in the order given by variable ord. For example, given the following matrix:

m has 3 dimensions

m(1,:,:) = all 1s
m(2,:,:) = all 2s
m(3,:,:) = all 3s

After the transformation to [3 2 1], the matrix should be:

m(:,:,1) = all 1s
m(:,:,2) = all 2s
m(:,:,3) = all 3s

Solution Stats

43.59% Correct | 56.41% Incorrect
Last Solution submitted on Oct 15, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
14
6

Problem Recent Solvers31

Suggested Problems

More from this Author11

Community Treasure Hunt

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

Start Hunting!
Go to top of page