help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i just want to use nonlinear curve fitting function , what should i


From: Jaroslav Hajek
Subject: Re: i just want to use nonlinear curve fitting function , what should i do?
Date: Sun, 17 Jan 2010 06:37:46 +0100

On Fri, Jan 15, 2010 at 1:22 PM, boluor <address@hidden> wrote:
> i want to use the nonlinear curve fitting function in an standalone program
> ,and then i don't need to install octave in my computer.
>
> i know there is a "fit" function in gnuplot that do this job , and which in
> octave ?
>
> what should i do ?
>

In Octave 3.2.0 and higher, nonlinear curve fitting can be done
through the function fsolve.
To use in a stand-alone program, you need to link it with the Octave
libraries, and then take these steps:

1a. prepare your objective function as a C++ function, using Octave's
Array classes as inputs/outputs
1b. wrap it in an octave_builtin object
OR
1ab. prepare your objective as an m-file function
2. initialize Octave interpreter
3. call fsolve through the feval interface (parse.h)

using Octave this way is not exceptionally hard, but still it's
nothing for beginners. The biggest obstacle is the lack of internal
documentation, so unless you're fine with reading code, you may have a
hard time to figure everything out.

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]