Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Re: Newbie Question -- Plot3d::plnc

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52840] Re: [mg52781] Re: Newbie Question -- Plot3d::plnc
  • From: DrBob <drbob at bigfoot.com>
  • Date: Tue, 14 Dec 2004 05:59:47 -0500 (EST)
  • References: <cpav9n$isv$1@smc.vnet.net><cpekan$736$1@smc.vnet.net> <200412130922.EAA23396@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

>> Function Plot3D doesn't consider the first argument as a function, but...

This works just fine:

xtimesy[x_, y_] = x*y;
Plot3D[xtimesy[x, y], {x, -5, 5}, {y, -5, 5}]

Bobby

On Mon, 13 Dec 2004 04:22:30 -0500 (EST), nguyen.longson at gmail.com <nguyen.longson at gmail.com> wrote:

> You can do what you want by typing these commands instead
>
> xtimesy = x*y;
> Plot3D[xtimesy, {x, -5, 5}, {y, -5, 5}]
>
> Function Plot3D doesn't consider the first argument as a function, but
> as a list of values of xtimesy at the specified values of x and y (the
> values that you defined by {x, -5, 5}, {y, -5, 5}
>
> Cheers,
>
>
> Helen Read wrote:
>> jujubaby at gmail.com wrote:
>> > X-No-Archive: Yes
>> >
>> > When I enter the following two statements into Mathematica 5:
>> >
>> > xtimesy[x_, y_] := x*y;
>> > Plot3D[xtimesy[x y], {x, -5, 5}, {y, -5, 5}]
>> >
>> > I receive a huge cascade of errors, all of this form:
>> >
>> > Plot3D::plnc: xtimesy[x\y] is neither a machine-size real number at
> \
>> > {x,y}={-5.,-5.} nor a list of a real number and a valid color
>> > directive.
>> >
>> > What am I doing wrong?
>>
>> Should be
>>
>> xtimesy[x_, y_] := x*y;
>> Plot3D[xtimesy[x,y], {x, -5, 5}, {y, -5, 5}]
>>
>> --
>> Helen Read
>> University of Vermont
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Remove the higher order terms in series expansion
  • Next by Date: Re: defining variables as Real
  • Previous by thread: Re: Newbie Question -- Plot3d::plnc
  • Next by thread: Reduce[] in version 5.1