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