Ältere Kommentare anzeigen
値は変更せず、行だけ丸々移動するには、どのようなプログラムにすれば良いのでしょうか。
初歩的な質問ですみません。
A = 1:33
B = reshape(A,[3,11])
% [1,4,7...]と並んでいる1行目と、[3,6,9...]と並んでいる3行目を入れ替えたいです。
Antworten (1)
以下のように配列番号の設定で行えます。
A = 1:33;
B = reshape(A,[3,11])
B([1 3],:) = B([3 1],:)
1 Kommentar
周平
am 1 Nov. 2022
Kategorien
Mehr zu 行列および配列 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!