home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!hmarvel
- From: hmarvel@magnus.acs.ohio-state.edu (Howard P Marvel)
- Subject: plots and eval
- Message-ID: <1992Sep10.164017.3507@magnus.acs.ohio-state.edu>
- Sender: news@magnus.acs.ohio-state.edu
- Nntp-Posting-Host: top.magnus.acs.ohio-state.edu
- Organization: The Ohio State University
- Date: Thu, 10 Sep 1992 16:40:17 GMT
- Lines: 20
-
- Consider the following series of statements in Maple:
-
- c := proc (alpha,beta) if signum(alpha+beta)=1 then alpha+ beta else 0 fi en\
- d;
- c(a,b);
- a:=1;
- b:=1;
- c(a,b);
- plot3d(c(x,y),x=0..1,y=0..1);
-
- The first sets up a proc that returns alpha + beta if alpha + beta is
- a positive real. However, if alpha and beta are variables, signum
- cannot evaluate the expression, and the proc returns 0. The first call
- c(a,b) returns 0 and the second returns 2. Now consider the plot
- statement. This should yield values from 0 to 2, right? Instead,
- signum fails and all plotted values are 0. My question is, is there a
- way to force Maple to evaluate c for the values in question and to
- plot the values?
-
- Thanks in advance for any suggestions.
-