Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.1K Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Select certain elements of sublists of a list

Posted 6 years ago
POSTED BY: Laurens Wachters
3 Replies

Thanks, Marco. That is it. Cheers, Laurens

POSTED BY: Laurens Wachters

Well, in fact you do not even need the Flatten or Partition:

Select[# < 0 &] /@ list

Cheers,

Marco

POSTED BY: Marco Thiel

Hi Laurens, The easiest I can think of is the following:

 list = {{-1, 4, -5, 6}, {-5, -4, 3, 1}};
    l1 = Flatten[list] // Select[# < 0 &];
    Partition[l1, 2]

{{-1, -5}, {-5, -4}}

Best Regards Christos

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard