WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
0
|
3438 Views
|
2 Replies
|
3 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Combining Arrays (two 2x2 into one 4x4)
Ivan Morozov
Ivan Morozov, Budker Institute of Nuclear Physics
Posted
12 years ago
Hi,
How can I transform:
a = {{4, 1}, {1, 3}};
b = {{-1, -2}, {1, -2}};
into
c = {{4, 1, -1, -2}, {4, 1, 1, -2}, {1, 3, -1, -2}, {1, 3, 1, -2}};
I.M.
POSTED BY:
Ivan Morozov
Reply
|
Flag
2 Replies
Sort By:
Replies
Likes
Recent
3
David Keith
David Keith
Posted
12 years ago
In[7]:= Flatten[Outer[Join, a, b, 1], 1]
Out[7]= {{4, 1, -1, -2}, {4, 1, 1, -2}, {1, 3, -1, -2}, {1, 3, 1, -2}}
POSTED BY:
David Keith
Reply
|
Flag
0
Ivan Morozov
Ivan Morozov, Budker Institute of Nuclear Physics
Posted
12 years ago
Great, thank you David!
POSTED BY:
Ivan Morozov
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback