home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / sci / math / symbolic / 3324 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.1 KB  |  32 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!utcsri!utmath!madore
  3. From: madore@math.toronto.edu (Blair F. Madore)
  4. Subject: Re: Help with user defined functions in Maple.
  5. Message-ID: <1992Dec21.144600.28799@math.toronto.edu>
  6. Organization: Department of Mathematics, University of Toronto
  7. References: <1992Dec17.060755.53708@ns1.cc.lehigh.edu>
  8. Date: Mon, 21 Dec 92 14:46:00 GMT
  9. Lines: 21
  10.  
  11. In article <1992Dec17.060755.53708@ns1.cc.lehigh.edu> jmp1@ns1.cc.lehigh.edu (JEFFREY MICHAEL PARSONS) writes:
  12. >I tried defining a function in Maple V r1.1 like this:
  13. >
  14. >f := proc(x)  if x<0 then -1 else 1 fi;  end;
  15. >
  16. >I could then type f(3) or f(-100) and get the correct result.  The problem is
  17. >that I can't integrate it, etc.  I always get:
  18. >
  19. >Error, (in f) cannot evaluate boolean.
  20. >
  21. >Is there a better way to be doing this kind of thing?
  22.  
  23. What you may want to look at is somehting called algorithmic differentiation.
  24. It's in the Maple Share library. It allows you to differentiate procedures
  25. like the one you've defined.
  26.  
  27. Off the top of my head I can't remember the ftp address for the share library,
  28. but I'm sure info@maplesoft.ont.ca would help you.
  29.  
  30. Blair
  31.  
  32.