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