Hi! I want o calc the norm of a complex number ( |c| where c is complex). Does the function abs() this ? Thanks, -- Frank G. Zoellner AG Angewandte Informatik Technische Fakult"at Universit"at Bielefeld phone: +49(0)521-106-2951 fax: +49(0)521-106-2992 email: fzoellne at techfak.uni-bielefeld.de
?complex reveals "Mod": > Mod(1+1i) [1] 1.414214 > hope this helps. spencer graves p.s. help.search("complex") reveals "complex", etc. Frank Gerrit Zoellner wrote:>Hi! > >I want o calc the norm of a complex number ( |c| where c is complex). Does the function abs() this ? > >Thanks, > >
Not abs(), but Mod(). See ?complex. HTH, Andy> From: Frank Gerrit Zoellner > > Hi! > > I want o calc the norm of a complex number ( |c| where c is > complex). Does the function abs() this ? > > Thanks, > -- > Frank G. Zoellner > AG Angewandte Informatik > Technische Fakult"at > Universit"at Bielefeld > phone: +49(0)521-106-2951 > fax: +49(0)521-106-2992 > email: fzoellne at techfak.uni-bielefeld.de > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
That's called the modulus, and computed by function Mod(). On Mon, 15 Mar 2004, Frank Gerrit Zoellner wrote:> I want o calc the norm of a complex number ( |c| where c is complex). > Does the function abs() this ?-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
>>>>> "Frank" == Frank Gerrit Zoellner <fzoellne at techfak.uni-bielefeld.de> >>>>> on Mon, 15 Mar 2004 16:31:58 +0100 writes:Frank> Hi! I want o calc the norm of a complex number ( |c| Frank> where c is complex). Does the function abs() this ? Yes, it does - and help(abs) will tell you so in the next version of R. For complex numbers, the more usual function name is Mod(). Regards, Martin Maechler