From maintainers-request at octave dot org Thu Mar 30 09:10:37 2006 Subject: Re: Bi variate to mono variate functions From: "John W. Eaton" To: David dot Bateman at motorola dot com Cc: Anglade Pierre-Matthieu , maintainers@octave.org Date: Thu, 30 Mar 2006 10:10:25 -0500 On 30-Mar-2006, David Bateman wrote: | I have R14sp3 installed, which I believe is the latest version as it is | dated Feb 13, 2006. So I don't think it is fixed... Strange. Here is what I see with the version installed on the UW COE systems (Version 7.1.0.183 (R14) Service Pack 3, August 02, 2005): >> type myfun2 function y = myfun2(x,c) y = 1./(x.^3-2*x-c); >> p = 5 p = 5 >> quad ( at (x) myfun2 (x, p), 0, 2) ans = -0.4605 Also, this type of behavior is documented for fsolve: >> help fsolve FSOLVE solves systems of nonlinear equations of several variables. [...] To solve the system of equations for a specific value of c, first assign the value to c. Then create a one-argument anonymous function that captures that value of c and calls myfun with two arguments. Finally, pass this anonymous function to FSOLVE: c = -1; % define parameter first x = fsolve( at (x) myfun(x,c),[-5;-5]) See also OPTIMSET, LSQNONLIN, at , INLINE. jwe