MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MapThread


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
> 



  • Prev by Date: Re: Converting result to ASCII-art
  • Next by Date: Re: ok. How to resolve?
  • Previous by thread: Re: MapThread
  • Next by thread: Re: MapThread