re-arranging of columns
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(1 个)
Jos (10584)
2014-4-4
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!