Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.4K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to join two simple parts programs

Attachments:
2 Replies

Yes, your suggestions worked very well. Thank you.

Hi Antonio,

I downloaded your notebook, but I'm not entirely sure I understand the problem... Does one of these things help you? Also, please take a look at the Documentation for Part and Flatten for more examples.

test = {{1, 2}}
test[[1]]
(*returns {1,2} *)

test2 = {{1, 2}, {3, 4}}
Flatten[test2]
(*returns {1, 2, 3, 4} *)

test3 = {{{1, 2}}, {{3, 4}}}
Flatten[test3, 1]
test3[[All, 1]]
(*both return {{1, 2}, {3, 4}} *)
Flatten[test3]
(*returns {1, 2, 3, 4} *)
POSTED BY: Bianca Eifert
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard