Message Boards Message Boards

0
|
1176 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

taking specified columns of a matrix

Anonymous User
Anonymous User
Posted 9 years ago

how to take 1,3,5 columns of {{1,2,3,4,5},{2,1,3,4,5},{2,3,1,4,5}}

POSTED BY: Anonymous User
In[137]:= l = {{1, 2, 3, 4, 5}, {2, 1, 3, 4, 5}, {2, 3, 1, 4, 5}};

In[138]:= l[[All, {1, 3, 5}]]

Out[138]= {{1, 3, 5}, {2, 3, 5}, {2, 1, 5}}
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract