re-arranging of columns
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
hi everyone..
i have a data file with 24 columns and 125 rows... I want to bring 23rd column after column 4... how will i do that... please help
0 Commenti
Risposta accettata
Più risposte (1)
Jos (10584)
il 4 Apr 2014
No need for concatenation …
A = load('mydatafile.txt') % only numbers separated by spaces/tabs
A(:,[4 23]) = A(:,[23 4]) % switch columns 4 and 23
0 Commenti
Vedere anche
Categorie
Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!