Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15772
| From | Bob Hanlon <hanlonr@cox.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Parculiarities of FindRoot |
| Date | 2011-02-01 11:55 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ii8sam$2pb$1@smc.vnet.net> (permalink) |
Func can only be evaluated with a numeric argument, Use
Func[y_?NumericQ] := x^2 /. FindRoot[x + y == 0, {x, 0.}]
Bob Hanlon
---- Tianhui Li <tianhuil@princeton.edu> wrote:
=============
Here's a question for the group: in the following function, Func seems
to evaluate numerical arguments correctly and *works* when you throw
it into a FindRoot. But the second command generates a lot of warning
messages. Does anyone understand why?
Func[y_] := x^2 /. FindRoot[x + y == 0, {x, 0.}]
Func[.2]
FindRoot[Func[z], {z, 0.}]
Warm Regards,
Michael Li
Bendheim Center for Finance
Princeton University
Princeton, NJ 08544
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Parculiarities of FindRoot Bob Hanlon <hanlonr@cox.net> - 2011-02-01 11:55 +0000
csiph-web