Displaying select matrix columns with headers
10 views (last 30 days)
Show older comments
Is there a way to display only specific columns of a matrix (say columns 1, 10, 20, 32) with column and row headers for display purposes?
0 Comments
Answers (1)
per isakson
on 10 Feb 2014
Edited: per isakson
on 10 Feb 2014
Hint:
M = magic(12);
M( :, [ 3, 5 ,9 ] )
returns
ans =
3 140 136
130 17 21
118 29 33
39 104 100
....
and see fprintf
0 Comments
See Also
Categories
Find more on Multidimensional Arrays 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!