フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

swap matrix positions in 3d matrices

2 ビュー (過去 30 日間)
Jam
Jam 2013 年 1 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
How do I swap matrix positions? So if I wanted
a(1,1,:) = [1 2 3 4];
a(1,2,:) = [1 1 1 1];
to become
a(1,1,:) = [1 1 1 1];
a(1,2,:) = [1 2 3 4];
  1 件のコメント
Jan
Jan 2013 年 1 月 17 日
Such questions are discussed exhaustively in the Getting Started chapters of the documentation. It is recommended to read them.

回答 (2 件)

Andrei Bobrov
Andrei Bobrov 2013 年 1 月 17 日
編集済み: Andrei Bobrov 2013 年 1 月 17 日
a(1,1:2,:) = a(1,[2,1],:);

Colin
Colin 2013 年 1 月 17 日
a(1,[1 2],:) = a(1,[2 1],:);

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by