Re: Arg[z] that works with zero argument?
- To: mathgroup at smc.vnet.net
- Subject: [mg50881] Re: Arg[z] that works with zero argument?
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Sat, 25 Sep 2004 01:55:32 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 9/24/04 at 4:41 AM, siegman at stanford.edu (AES/newspost) wrote: >I'd like a simple Arg[z] function that would "work" [return some >simple value; zero is OK] for zero argument values, even if z is a >list. >My simplest kludge so far is >myArg[z_] := Module[{eps=10^(-17)}, Arg[z+eps]] >Seems to work OK so far -- better ways to do this? Did you try Arg[z] where z is a list? Attributes[Arg] {Listable, NumericFunction, Protected} Arg[Table[Random[], {4}]] {0, 0, 0, 0} The attribute Listable tells you Arg will accept a list as a argument and do the right thing. -- To reply via email subtract one hundred and four