I had a matrix s of size 4*12540, i want to use only 4*4 of this matrix how should i remove extra columns?
Show older comments
I had a matrix s of size 4*12540, i want to use only 4*4 of this matrix how should i remove extra columns?
Accepted Answer
More Answers (1)
Joseph Cheng
on 31 Mar 2014
Edited: Joseph Cheng
on 31 Mar 2014
If you want to completely remove these columns you can use [] ;
example:
Testmatrix = rand(4,12540);
Testmatrix(:,5:end) = [];%All rows in columns 5 through end are blank;
Categories
Find more on Creating and Concatenating Matrices 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!