Re: MapThread
- To: mathgroup at smc.vnet.net
- Subject: [mg57027] Re: MapThread
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Thu, 12 May 2005 03:53:08 -0400 (EDT)
- Organization: Uni Leipzig
- References: <d5uu9p$919$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, you can't say that 3=33 this is nonsense and Mathematica don't like it, you can MapThread[Hold[{#1 == #2}] &, {Take [states, {3, 12, 2}], stim}] Regards Jens "Swati Shah" <swatshah at gmail.com> schrieb im Newsbeitrag news:d5uu9p$919$1 at smc.vnet.net... > Hi Everyone, > > I have been working on the following problem: > > states = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, > 13, 14} > > stim = {33, 44, 55, 66, 77} > > > The locations of state 3,5,7,9,11 to be equal > 33,44,55,66,77 > > MapThread[{#1 = #2} &, {Take [states, {3, 12, > 2}], stim}] > > I tried to the above but it gives me errors: > Set::setraw: Cannot assign to raw object 3 > > However these work individually: > MapThread[#1 &, {Take [states, {3, 12, 2}], > stim}] > MapThread[ #2 &, {Take [states, {3, 12, 2}], > stim}] > > Any ideas? > > Thanks in advance >