Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'ReplacePart' topicStudent Support Forum > General > "ReplacePart"

Next Comment >Help | Reply To Topic
Author Comment/Response
Anthony
09/05/09 05:34am

M4 = {{9}, {9}, {10}}
M2 = {{0, 2, 5}, {2, 1, 1}, {3, 1, 0}}
M5 = ReplacePart[M2, {_, 1} -> M4 {i}]
Output: {{{i} {{9}, {9}, {10}}, 2, 5}, {{i} {{9}, {9}, {10}}, 1,
1}, {{i} {{9}, {9}, {10}}, 1, 0}}

How can i replace M2's column 1 with M4 such that it show {{9, 2, 5}, {9, 1, 1}, {10, 1, 0}}

Thanks

URL: ,

Subject (listing for 'ReplacePart')
Author Date Posted
ReplacePart Anthony 09/05/09 05:34am
Re: ReplacePart Lothar 09/05/09 1:49pm
Re: ReplacePart yehuda ben-s... 09/06/09 07:02am
Next Comment >Help | Reply To Topic