MathGroup Archive 1999

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

Search the Archive

Re: Graphing 4D functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20848] [mg20848] Re: Graphing 4D functions
  • From: "Seth Chandler" <SChandler at uh.edu>
  • Date: Wed, 17 Nov 1999 03:41:08 -0500 (EST)
  • Organization: University of Houston
  • References: <80ngho$25o@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

There are many reasons that your code might not work. To begin with, your
expression C1[x,y,z]:= stuff simply tells the Mathematica kernel what to do
if it encounters the precise expression C1[x,y,z]. It does not tell the
kernel what to do if it encounters C1[3,4,5]. Why? Because 3 is not the same
as x. The concept you may be missing is that of patterns. If you write
C1[x_,y_,z_]:=37 then each time the kernel encounters an expression with a
Head of C1 and three arguments it will return 37 (or whatever you stick on
the right hand side).

Second, telling the kernel Plot3D[C1,{x,0,10},{y,0,10}] won't work because
C1 is just a symbol that does not evaluate to a number.

Here is a simple fix for this particular problem:

C1[x_,y_,z_]:=whatever

Plot3D[C1[x,y,0.5],{x,0,10},{y,0,10}]

More generally, I would recommend some additional reading either from the
Wolfram Mathematica book or perhaps from the Gaylord, Mathematica
programming book (or from many other fine sources) on concepts of
Mathematica. It is not like many other programming languages to which people
have been exposed.

I'm afraid I don't understand your comment about batch files.

Good luck. (And, in time, you may realize that Mathematica actually can be
used to help visualize four-variable functions using ContourPlot3D and some
animation. But that is a topic for another day).

Seth J. Chandler
University of Houston Law Center


Christopher Knittel <knittel at bu.edu> wrote in message
news:80ngho$25o at smc.vnet.net...
> I want to graph something in 4 dimensions. Just kidding.
>
> What I really want to do is graph a function of three variables after
> defining one of the variables as a constant.
>
> I tried the following:
>
> C1[X,Y,Z] : = stuff
> I then evaluated this.
> Z=.5
> Then evaluated this.
> Plot3D[C1,{X,0,10},{Y,0,10}]
> This doesn't work!!!!!! I also tried it with = instead of :=.
>
> As is probably clear, I am new to mathematica.
>
> One other question is,
>
> How would I right a batch file for this? And how would I run the batch
file?
> I don't know if I have to keep evaluating stuff, or what.
>
> Thanks,
> Chris
> knittel at bu.edu
>
>
>




  • Prev by Date: Re: Simultaneous Forward and Reverse Polynomial Fits ?
  • Next by Date: Re: Help with geometry problem required.
  • Previous by thread: Re: Graphing 4D functions
  • Next by thread: Re: Bishop moves