Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

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
> 



  • 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