Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'MapAt with All operator' topicStudent Support Forum > General > "MapAt with All operator"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda ben-shimol
09/26/10 02:37am

you can assign values directly to parts of a matrix
so
mat = {{1, 2 + I, 3 + I, 4 + I}, {5, 6 + I, 7 + I, 8 + I}, {9, 10 + I,
11 + I, 12 + I}};
(mat[[All, 2 ;; 3]] = Map[f, mat[[All, 2 ;; 3]], {2}])

now check the result

mat//MatrixForm

for you case replace f with any meaningful function (you used Im)

yehuda



URL: ,

Subject (listing for 'MapAt with All operator')
Author Date Posted
MapAt with All operator krindik 09/23/10 8:02pm
Re: MapAt with All operator yehuda ben-s... 09/26/10 02:37am
Re: Re: MapAt with All operator krindik 09/26/10 7:19pm
Re: Re: Re: MapAt with All operator yehuda ben-s... 09/27/10 00:29am
Re: Re: Re: MapAt with All operator yehuda ben-s... 09/27/10 04:28am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic