MathGroup Archive 2005

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

Search the Archive

MapThread


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: Output to a file
  • Next by Date: Re: Remote Kernel
  • Previous by thread: Re: Output to a file
  • Next by thread: Re: MapThread