| Author |
Comment/Response |
krindik
|
09/26/10 7:19pm
In Response To 'Re: MapAt with All operator' --------- Thanks yehuda,
In that case I need to compute the length of the column (=3 in ur example). Also, I'm looking for the MapAt function, since Map returns only the modified part.
eg.
aaa = {{1, 2+I, 3+I, 4+I}, {5, 6+I, 7+I, 8+I}, {9, 10+I, 11+I, 12+I}};
Map[Im, aaa[[All, 2 ;; All]]]
gives
{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}
but I expect to use MapAt and get something like the following
{{1, 1, 1, 1}, {5, 1, 1, 1}, {9, 1, 1, 1}}
It is basically applying a function to a part of a matrix "in place".
I could use Map and later combine the first column with a sequence of other functions. But I thought MapAt would conveniently do that for me.
URL: , |
|