Swapping columns in a 375x91x223 variable

2 ビュー (過去 30 日間)
ajk1
ajk1 2016 年 7 月 1 日
コメント済み: ajk1 2016 年 7 月 2 日
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 日
I would use the permute command:
vol = permute(vol,[1 3 2]);
  1 件のコメント
ajk1
ajk1 2016 年 7 月 2 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by