Re: New user question
- To: mathgroup at smc.vnet.net
- Subject: [mg20393] Re: New user question
- From: Harald Giese <giese at dkrz.de>
- Date: Tue, 26 Oct 1999 00:32:49 -0400
- Organization: Institut fuer Meereskunde, Universitaet Hamburg
- References: <7uefh0$277@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Thomas Moriarty wrote: > > I have just begun to use/learn Mathematica. One of the first things I > tried was to Plot[x^(1/3),{x,-5,5}] and got error messages indicating that > the negatives^(1/3) were not machine level real numbers (or close to > that) - the positive side displayed ok. > > What am I doing wrong? > Hi Thomas, Mathematica plots only real numbers, but the roots of negative reals are complex numbers. Plot[Im[x^(1/3)], {x,-5,5}] will give you the imaginary part, Plot[Abs[x^(1/3)], {x,-5,5}] the absolute values. Every time Mathematica does not plot the result you expected, you should first take a look at some of values you want to have plotted. Regards, /Harald -- Harald Giese Email: giese at dkrz.de > NEUE TELEFON-NUMMER | NEW PHONE-NUMBER < Phone: +49 (0)40 42838 5796; Fax: +49 (0)40 5605724 Institut fuer Meereskunde der Universitaet Hamburg (Institute of Oceanography of the University of Hamburg) Troplowitzstrasse 7, D-22529 Hamburg