Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

A problem with Thread[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111389] A problem with Thread[]
  • From: guerom00 <guerom00 at gmail.com>
  • Date: Fri, 30 Jul 2010 06:56:11 -0400 (EDT)

Hello all,

Here is a snippet of code:

MyArcTan := Function[{x, y},
   Module[{result},
    If[x == 0 && y == 0,
     result = 0,
     result = ArcTan[x, y]
     ];
    result
    ]
   ];

In[725]:= Thread[MyArcTan[{-1, 0, 1}, 0]]

Out[725]= result$58407737

Somehow, when I thread my custom function MyArcTan[], it does not
execute the If[] test hence do not define the result...

How can I solve that ?

TIA


  • Prev by Date: different results for Standard vs Prefix forms
  • Next by Date: Cannot load example data
  • Previous by thread: Re: different results for Standard vs Prefix forms
  • Next by thread: Re: A problem with Thread[]