MathGroup Archive 1998

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

Search the Archive

Re: About 3Dplot....



smk94 wrote:
> 
> I have a certain function with two ind. variables  ( f(x,y) ) and I want
> a plot of it.
> The problem is that the form of the function varies according to the
> values of
> the ind. variables.
> This is easily determined, if we have a function like : f(x) ,using the
> command which. The same command can be used for functions containing
> more than one ind. variable?
> If not, how can I state this function in Mathematica , in order to have
> a plot of it or
> to  find substationary points (local minimum) I'm working on problems of
> nonconvex optimazation.
> 
> Thank you
> ..a student from Greece.

Which works in general, for example:

f[x_,y_]:= 
	Which[
		x<y, x-y,
		x<y+2,x+y,
		True, x y
	]
-- 
Allan Hayes
 Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642




  • Prev by Date: RE: Extracting polynomial coef
  • Next by Date: Mathamatica Format's Last Theorem Visualization
  • Prev by thread: About 3Dplot....
  • Next by thread: Printing in NT 4.0