Afficher commentaires plus anciens
値は変更せず、行だけ丸々移動するには、どのようなプログラムにすれば良いのでしょうか。
初歩的な質問ですみません。
A = 1:33
B = reshape(A,[3,11])
% [1,4,7...]と並んでいる1行目と、[3,6,9...]と並んでいる3行目を入れ替えたいです。
Réponses (1)
以下のように配列番号の設定で行えます。
A = 1:33;
B = reshape(A,[3,11])
B([1 3],:) = B([3 1],:)
1 commentaire
周平
le 1 Nov 2022
Catégories
En savoir plus sur 行列および配列 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!