fastest way to divide a matrix columns into two matrices ?
2 次查看(过去 30 天)
显示 更早的评论
Hi All
I have an m*n matrix
I want to take out the fifth column (all the m rows) to one matrix , and alll of the other collumns , to another , how to do that ?
0 个评论
采纳的回答
Azzi Abdelmalek
2015-3-20
编辑:Azzi Abdelmalek
2015-3-20
%If A is your matrix
A=randi(10,5,8) % example
c5=A(:,5) % the fifth column
B=A(:,[1:4 6:m]) % remaining matrix
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!