FAQ Database Discussion Community


non-linear optimization in R using optim

r,nonlinear-optimization
I'm a newbie in R! I would like to find the best gamma distribution parameters to fit my experimental counts data. The optim function's help file says the first argument of the function should be the parameters to be optimized. So I tried : x = as.matrix(seq(1,20,0.1)) yexp = dgamma(x,2,1)*100...

Find minimum of nonlinear system of equations with nonlinear equality and inequality constraints in MATLAB

matlab,constraints,equality,nonlinear-optimization,inequality
I need to solve this problem better described at the title. The idea is that I have two nonlinear equations in four variables, together with two nonlinear inequality constraints. I have discovered that the function fmincon is probably the best approach, as you can set everything I require in this...

How to solve nonlinear equation with Python with three unknowns and hundreds of solutions?

python,numpy,scipy,nonlinear-optimization
I am trying to use python to find the values of three unknowns (x,y,z) in a nonlinear equation of the type: g(x) * h(y) * k(z) = F where F is a vector with hundreds of values. I successfully used scipy.optimize.minimize where F only had 3 values, but that failed...

To restrict lsqcurvefit's output to positive values

matlab,curve-fitting,nonlinear-optimization
I think this depends much on the objective function. However, if there are any other ways to limit it - it would be great. At least, my teacher says there is some option. However, I cannot find it from the manual in searching positive. Is there any setting to limit...