Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

swap matrix positions in 3d matrices

2 Ansichten (letzte 30 Tage)
Jam
Jam am 17 Jan. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
Jan
Jan am 17 Jan. 2013
Such questions are discussed exhaustively in the Getting Started chapters of the documentation. It is recommended to read them.

Antworten (2)

Andrei Bobrov
Andrei Bobrov am 17 Jan. 2013
Bearbeitet: Andrei Bobrov am 17 Jan. 2013
a(1,1:2,:) = a(1,[2,1],:);

Colin
Colin am 17 Jan. 2013
a(1,[1 2],:) = a(1,[2 1],:);

Diese Frage ist geschlossen.

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by