home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / sci / math / symbolic / 3303 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  746 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!hela.iti.org!cs.widener.edu!dsinc!netnews.upenn.edu!netnews.cc.lehigh.edu!ns1.cc.lehigh.edu!jmp1
  2. From: jmp1@ns1.cc.lehigh.edu (JEFFREY MICHAEL PARSONS)
  3. Newsgroups: sci.math.symbolic
  4. Subject: Help with user defined functions in Maple.
  5. Message-ID: <1992Dec17.060755.53708@ns1.cc.lehigh.edu>
  6. Date: 17 Dec 92 06:07:55 GMT
  7. Organization: Lehigh University
  8. Lines: 13
  9.  
  10. I tried defining a function in Maple V r1.1 like this:
  11.  
  12. f := proc(x)  if x<0 then -1 else 1 fi;  end;
  13.  
  14. I could then type f(3) or f(-100) and get the correct result.  The problem is
  15. that I can't integrate it, etc.  I always get:
  16.  
  17. Error, (in f) cannot evaluate boolean.
  18.  
  19. Is there a better way to be doing this kind of thing?
  20.  
  21. Thanks.
  22. -- 
  23.