Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

swap matrix positions in 3d matrices

2 vues (au cours des 30 derniers jours)
Jam
Jam le 17 Jan 2013
Clôturé : MATLAB Answer Bot le 20 Août 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 commentaire
Jan
Jan le 17 Jan 2013
Such questions are discussed exhaustively in the Getting Started chapters of the documentation. It is recommended to read them.

Réponses (2)

Andrei Bobrov
Andrei Bobrov le 17 Jan 2013
Modifié(e) : Andrei Bobrov le 17 Jan 2013
a(1,1:2,:) = a(1,[2,1],:);

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

Cette question est clôturée.

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by