Re: error message

*To*: mathgroup at smc.vnet.net*Subject*: [mg5083] Re: error message*From*: rubin at msu.edu (Paul A. Rubin)*Date*: Fri, 25 Oct 1996 22:48:42 -0400*Organization*: Michigan State University*Sender*: owner-wri-mathgroup at wolfram.com

In article <54kal9$d6r at dragonfly.wolfram.com>, gt1824a at prism.gatech.edu (Heather Mary Hauser) wrote: ->In using FindRoot to find the zeros of a function which I have defined by a ->procedure (too long to list here), I keep getting the error message ->"FindRoot::frnum:Function{{-0.00004794 - 0.000020387I}} is not a length 1 ->list of numbers at {r} = {0.15I}" . r = 0.15I is the first of two values I ->give to start the search, because I know that there is not a symbolic ->derivative to be found. I also know that this value is near a possible zero ->because it is midway through an interval where the function changes sign. ->(both real and imaginary parts). Can anybody tell me what this error message ->means ? -> ->Heather Hauser ->heather at eas.gatech.edu I can't be 100% certain without seeing the procedure code, but I think the problem is the nested set braces. FindRoot is substituting .15 I for r in the function definition and expecting to get back a list containing one number. (I *think* FindRoot does the substitution using replacement, which means the function is expected to spit back a number, and replacement presents it as a list consisting of that number.) The function, however, is apparently returning a *list* {-0.00004794 - 0.000020387I}, which the replacement operations surrounds with another pair of braces, thus yielding a list whose sole entry is a list (containing one number). Check your proc and see if it isn't making a list out of the answer. -- Paul ************************************************************************** * Paul A. Rubin Phone: (517) 432-3509 * * Department of Management Fax: (517) 432-1111 * * Eli Broad Graduate School of Management Net: RUBIN at MSU.EDU * * Michigan State University * * East Lansing, MI 48824-1122 (USA) * ************************************************************************** Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. J. W. v. GOETHE