Re: second simple problem - clarification
- To: mathgroup at smc.vnet.net
- Subject: [mg99684] Re: second simple problem - clarification
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Mon, 11 May 2009 06:23:50 -0400 (EDT)
- References: <firstname.lastname@example.org>
> In the problem below, I indeed found a solution. But I wonder if there is a faster/better/more elegant one.
> My solution is:
didn't see you have a solution already. Just some minor improvements,
but I think your code is alright.
1) you don't need the Flatten
2) Thread is probably clearer here than MapThread
3) no intermediate variables needed
ReplacePart[ex, Thread[Position[ex, "M"] -> rL]]
is doing exactly the same thing...
I think it is quite clear code and shouldn't be too slow, I guess if you
get faster solutions, they will be not as clear to read as this one...
Prev by Date:
Re: second simple problem
Next by Date:
Re: simple question
Previous by thread:
second simple problem - clarification
Next by thread:
Problem with 3d graphics on Linux