Swapping columns in a 375x91x223 variable

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.

 채택된 답변

the cyclist
the cyclist 2016년 7월 1일
편집: the cyclist 2016년 7월 1일

2 개 추천

I would use the permute command:
vol = permute(vol,[1 3 2]);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Identification에 대해 자세히 알아보기

질문:

2016년 7월 1일

댓글:

2016년 7월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by