How to swap columns of a matrix??

45 ビュー (過去 30 日間)
Ali nouri
Ali nouri 2020 年 3 月 24 日
回答済み: Birdman 2020 年 3 月 24 日
I have a matrix of 8760X30, the first 7 columns need to be swap with some other column. eg. the first and the second columns need to need to be swap with the 8 and 9 column.

採用された回答

Birdman
Birdman 2020 年 3 月 24 日
Simple approach(Consider matrix A):
A(:,[1 2 8 9])=A(:,[8 9 1 2])

その他の回答 (0 件)

カテゴリ

Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by