Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

swap matrix positions in 3d matrices

2 visualizzazioni (ultimi 30 giorni)
Jam
Jam il 17 Gen 2013
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commento
Jan
Jan il 17 Gen 2013
Such questions are discussed exhaustively in the Getting Started chapters of the documentation. It is recommended to read them.

Risposte (2)

Andrei Bobrov
Andrei Bobrov il 17 Gen 2013
Modificato: Andrei Bobrov il 17 Gen 2013
a(1,1:2,:) = a(1,[2,1],:);

Colin
Colin il 17 Gen 2013
a(1,[1 2],:) = a(1,[2 1],:);

Questa domanda è chiusa.

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by