Swapping columns in a 375x91x223 variable

2 vues (au cours des 30 derniers jours)
ajk1
ajk1 le 1 Juil 2016
Commenté : ajk1 le 2 Juil 2016
Hi, I have a variable called 'vol' that is 375 x 91 x 223 and I would like the output to be 375 x 223 x 91. I have previously rehaped this and used:
vol=reshape(vol,[375 91 223]); %from prior part of my code
vol(:,[2 3]) = vol(:,[3 2])
Your help would be appreciated thanks.

Réponse acceptée

the cyclist
the cyclist le 1 Juil 2016
Modifié(e) : the cyclist le 1 Juil 2016
I would use the permute command:
vol = permute(vol,[1 3 2]);

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by