help-octave
[Top][All Lists]
Advanced

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

standalone application (octave to c++): define anonymous function for no


From: ola
Subject: standalone application (octave to c++): define anonymous function for nonlin_curvefit()
Date: Mon, 28 Jan 2019 03:31:45 -0600 (CST)

Currently I try to use nonlin_curvefit() from octave optim package in my
standalone c++ code.
Unfortunatelly, I can't find any information how to declare octave-type
anonymous function in standalone application to prepare my model function.
Directly in octave I can do f = @(p,x)1-exp(p(1)*x), but in c++ I need to
declare a type of f; here function or octave::function doesn't work.
I can only use the feval to call nonlin_curvefit, and I don't know how put
there my model function, f:
octave_value_list result = octave::feval("nonlin_curvefit", ovl("@(p,x)
1-exp(p(1)*x)", init, t_points, y_val, opt(0)), 4); # also doesn't work

Could you help me?



-----
ola
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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